Updating the database using information_schema

5 pts.
Tags:
INFORMATION_SCHEMA views
SQL Server 2000
SQL Server INFORMATION_SCHEMA views
SQL Server synchronization
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
ASKED: November 14, 2008  9:55 AM
UPDATED: November 14, 2008  8:14 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following