sync - SQL multiple tables with synced IDENTITY columns -


i working on "cleaning up" database , need synchronize identity columns. using stored procedures handle data , mirror 1 table next (after cleaning , correcting datatypes). @ point in future want cut off old table , use new table, question how have identity field stay in sync while both in use... once old table removed new 1 need continue auto-incrementing , rebuilding/altering change identity field not option. possible or there better way go this?

my other thought create lookup table store id columns of both tables , anytime there insert in new table take old id , new id , insert them lookup table. kind of messy once old table out of way tho.

  1. set new table's identity non-identity field.
  2. modify either data population procedures populate non-identity field on new table old table's identity value.
  3. at cutover, switch new field auto-increment , set seed number accordingly.

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -