Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Best way to move data from one db to another and maintain relationships ? RE: Best way to move data from one db to another and maintain relationships ?

  • William Plourde (6/20/2013)


    Phil Parkin (6/20/2013)


    I would suggest that you need to change the design of the target database so that you do not have identity columns as PKs there. Just make them standard INT or BIGINT columns.

    Instead, retain the values from the source database. That will makes your updates so much easier, as row nnn in the source will map to row nnn in the target.

    thanks but that's not really an option. Due to business requirements both databases need to be the exact same structure, including identities. Basically we're balancing our data load across multiple dbs and keeping a master index of which db a person is stored in. Its a form of data balancing and allocation. So as the data grows we can assign new people or move people between dbs. In the future there will be a small group of dbs that store all the people.

    So a person could move from db A, to B to C to D etc?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.