SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


two databases, identical schema, migration question


two databases, identical schema, migration question

Author
Message
Matthew Cushing
Matthew Cushing
SSC Veteran
SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)

Group: General Forum Members
Points: 240 Visits: 416
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.
Grant Fritchey
Grant Fritchey
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39763 Visits: 32640
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 Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Matthew Cushing
Matthew Cushing
SSC Veteran
SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)SSC Veteran (240 reputation)

Group: General Forum Members
Points: 240 Visits: 416
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 Smile

YAY for not well formed schemas!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search