02-09-05, 12:28 #1Cavalier King Charles
- Join Date
- Dec 2002
- Préverenges, Switzerland
Unanswered: insert multi-table normalised data into an already populated db.
i have two backends "production" and "development"
i have a new bunch of users with heaps of data that needs to migrate from a legacy system.
plan "A" was to migrate the legacy stuff into the empty "development" backend. then, when everything is working fine, copy "production" data to the "development" backend (...which becomes the new "production" data)
this plan was initially attractive since my production data would be completely isolated from the migration data until the migration is complete & working.
BUT all my keys are autonumbers (actually sql-server auto-increment identities, but it's +/- the same) and all relationships will surely die when copying production data into the already populated tables.
all i can think of is seeding all autonumbers for the migrated data to much higher than the production data max so the production data can insert without any conflict after the migration is complete.
has anyone bumped into something similar? any ideas?
izycurrently using SS 2008R2
02-09-05, 13:44 #2Grand Poobah
- Join Date
- Sep 2003
I've had to do this (in the past) myself ... Either I do the way your thinking of (by setting a high enough initial autonumber to not collide with any existing data) or (I've also done) with having the production offline (or overnight) I'll write insert routines to add the rows on the primary key # then write all the related data based upon that key ...Back to Access ... ADO is not the way to go for speed ...