Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

two databases, identical schema, migration question Expand / Collapse
Author
Message
Posted Saturday, December 14, 2013 9:32 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 10:22 AM
Points: 166, Visits: 387
I have a client who is thinking of combining two separate databases into one larger one. The schema are identical so it's just a case of making sure of pulling the data in so that new keys are generated and the data sits side by side with the other.

Is is just a question of using a migration tool like Redgate to migrate the data, or do I have to write a series of scripts to insert all the data from db1 into db2? The main issue is that the schema is quite complicated.

Just looking for advice at this point.
Post #1523005
Posted Sunday, December 15, 2013 4:49 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 7:03 AM
Points: 15,738, Visits: 28,146
As much as I'd like to say that Red Gate is the way to go, I think you'd be better off using SSIS to build out a migration between the two. The Red Gate tools for moving data around are good at what they do, but they won't be able to generate new key values and apply those new values to related tables. You can do that much easier through SSIS.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1523017
Posted Sunday, December 15, 2013 8:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 10:22 AM
Points: 166, Visits: 387
I was thinking about that approach last night. I have a main table that has several dependent tables, so looking at insert into table1 get generated key, use that for all other tables to replace original key and so on and so on. Just have to figure out all of the relationships that need to be updated now :)

YAY for not well formed schemas!
Post #1523038
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse