5 pts.
 Updating the database using information_schema
I am having database a and b i want to update database a according to updations in database b .b is same as a operations are done on b database and after complition a will get updated for permanent change? how can I do this automatically by using information_schema in sql server 2000

Software/Hardware used:
ASKED: November 14, 2008  9:55 AM
UPDATED: November 14, 2008  8:14 PM

Answer Wiki:
This can be done, but you will need to write a series of very complex cursors to go through each record in the INFORMATION_SCHEMA.COLUMNS view and see if the matching column exists in the other database, if it doesn't add it using the ALTER TABLE command. You'll get much more reliable results if you use something like TOAD or Change Director from <a href="http://www.quest.com">Quest Software</a> to compare the databases and see what the differences are. These products can also generate change scripts which can be used to sync up the differences.
Last Wiki Answer Submitted:  November 14, 2008  8:12 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,520 pts.