[thelist] Database merging

Carolyn Jewel Carolyn.Jewel at LEGACYNET.COM
Wed Jun 1 09:24:53 CDT 2005

How do I go about merging databases? The problem is that the databases
on the production and staging servers are different, and now I need to
move stage to production. Production has some tables that no longer
exist in stage, and vice versa. In addition, some columns have been
removed and others added.

First, you need to know the schema for the Production db and the staging
db. Do a diff between them, as has been mentioned, so you know what's
changed and how that affects the data, your queries and your
applications. Presumably you've identified any data integrity issues
that the new schema might create. In SQL Server, you'd write a dts (data
transformation) to port your prod data to the staging database (or
whichever direction you need to go)

Another possibility is to writer alter and drop scripts for the
production db such that you're altering prod to match staging. Then a
write dts (or appropriate script) that will populate new tables and do
whatever is necessary to maintain data integrity.

Spend a lot of time analyzing your data integrity. 

Carolyn J.
****This electronic mail message, and any attachments transmitted with it, contains confidential information, intended only for the named addressee(s). If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, you are hereby notified that the use, distribution, copying, or disclosure of this communication is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by reply e-mail, and delete all copies of this communication from your computer and network. Thank you.*****

More information about the thelist mailing list