![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello; First off, let me say that I'm not a DBA, I'm more of a web application developer that has to wear many hats (but I did pass the 70-229 test So,that being said... My client has two databases: Database A and Database B Database B was built off of Database A, but has a few more tables and a few of the tables have been modified (new fields added.) Both databases are now full of data (no duplicate records), and it's now my job to merge Database A into Database B. Is this a job for DTS? Is there any other tool that can make this job easier? I've used DTS to copy data into empty database before, but I've never tried to merge two database together. Any advice on doing this would be appreciated! Sincerely, Todd M. Taylor |
#3
| |||
| |||
|
|
Hello; First off, let me say that I'm not a DBA, I'm more of a web application developer that has to wear many hats (but I did pass the 70-229 test So,that being said... My client has two databases: Database A and Database B Database B was built off of Database A, but has a few more tables and a few of the tables have been modified (new fields added.) Both databases are now full of data (no duplicate records), and it's now my job to merge Database A into Database B. Is this a job for DTS? Is there any other tool that can make this job easier? I've used DTS to copy data into empty database before, but I've never tried to merge two database together. Any advice on doing this would be appreciated! Sincerely, Todd M. Taylor |
#4
| |||
| |||
|
|
This is not necessarily that easy. You want to take rows from one database and insert them into another. What happens when primary key values get mixed up i.e. taken already by the destination? The answer would be a mapping table to map the old to the new so that PK/FK relationships do not get shot. Also what will happen if the destination already has an instance of the thing from the source? Who is the golden source? Should you do an update? The answer to this one is that it depends. Ideally you would have had something in place at the database creation time so you could have used Merge replication perhaps to do the synching. This though may have introduced problems for your apps because it will add columns to your source and destination tables. If you want to just copy over the destination with what is in the source and the destination has not had a life of its own then you may just want to blow it away and do a RESTORE from last night's backup of the source. In summary then this may not be as easy as you hope unfortunately. Allan |
#5
| |||
| |||
|
|
I dont think that DTS is the solution!! You can programm a general procedure that compare tables and merge data if needed . you can also visit this site provinding tools to compare databases !!! http://www.red-gate.com/sql/version30x_sql_compare.htm hch |
![]() |
| Thread Tools | |
| Display Modes | |
| |