Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto genarate script to alter table

Status
Not open for further replies.

hlybbi

Programmer
Mar 19, 2003
91
IS
is thera a way to make sql autogenerate script to alter tables

i have 2 db one desing db for my program and one db for the accual online program , and when i have alter the desing db i would like to run a script that alters the db witch is in use, with out destroing all the data that exist on that db.

Best regards Hlynur
 
Absolutely - go for SQL Compare. It will be some of the best money you ever spend. ANd it's not terribly expensive either. YOu can compare two databases to see what is differnt and then select exactly what items you want make the same on the second database. You do need to be careful how you do this as the scripts will rollback all the transactions if one fails and so you need to do objects that other objects depend on first. Usually I do table changes first, then views, then UDFs then sps. Sometimes I have to break it down a bit further if I have a table change dependant on another table change which must happen first.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top