Reputation: 4270
How do I migrate table schemas from one DB to another without damaging the data in the destination DB?
I want to move my data from my deployed development copy to the live database and would like to run some scripts to do it. I need to upgrade the schema for some tables and create others. I figure right now that I'll have to check each of the tables in the destination DB against the deployment one and then copy the new tables but that will be quite tedious. Are there any suggestions on how I can do this?
Upvotes: 0
Views: 1584
Reputation: 483
In addition to the RedGate software mentioned above, Embarcadero Change Manager can do both schema and data instance compares, then generate alter scripts for the schemas and DML scripts for the data to bring two database in sync.
Upvotes: 0
Reputation: 754408
Another one besides the excellent Red-Gate SQL Compare is ApexSQL's SQL Diff.
ApexSQL also has a SQL Data Diff if you also need to compare and synchronize data from various sources.
Highly recommended!
Marc
Upvotes: 1
Reputation: 134
Check out SQL Compare tool by Redgate
http://www.red-gate.com/products/SQL_Compare/index.htm
You should be able to compare both the databases and then generate scripts based on the differences.
Upvotes: 2
Reputation: 37658
You can use a tool to generate the scripts. Redbrick has one, and Erwin can do deltas as well.
Upvotes: 1