views:

31

answers:

3

how to update database structure using script?

I have old db in one server and new db in another server, I have to update the old db structure with new one. Can we do using script?

Please any one help me

Thank you.

+3  A: 

There are really great tools that do this. Sql Compare from Red Gate is excellent and I've used it often to do this kind of thing.

SQL Compare is the industry-standard tool for comparing and synchronizing SQL Server database schemas. It's used by over 200,000 developers, DBAs and test engineers worldwide because it's easy to use, it's fast, and it saves time.

Whether you are working with live databases, database snapshots, object SQL scripts under source control or an earlier backup, SQL Compare will help you compare and synchronize database changes quickly, simply and with zero errors.

Read the whitepaper on database development and discover how SQL Compare can save you astonishing amounts of time, whatever development model your team prefers to use. SQL Compare ensures accurate, fast results with maximum end-user

Preet Sangha
I agree. I've used both Red-Gate SQL Compare and another product called SQL Examiner... Red-Gate SQL Compare is an excellent tool
Kane
PS. I'm not on commission but a very happy customer.
Preet Sangha
A: 

You'll need some sort of structure comparison tool.

There are many on the market (none built-in), my personal favorite is SQL Delta:

http://www.sqldelta.com/

It enables both Structure comparison (and update scripting) and data comparison and scripting, with both possible from the command-line. (and it's quite cheap).

Tao
A: 

Thank you Preet Sangha & Tao

i'll try...

Santhosh
welcome :-) remember to accept answers if they work for you.
Preet Sangha