Trans replication and Identity columns

  • I am setting up a new db to publish to our DR box. There are many tables that have IDENTITY columns as the PK. What is the best way to handle these tables. The obvious fear is that that when we need to fail over the ID's will be out of sync and will cause further problems when we switch back to the primary server.

    TIA,

    Matt

  • Typically the identity columns dont get passed over to the subscriber. Makes sense since you want the data to match. If this is how your set up is initially, one way to go might be to create a script you can run when needed that will turn set the identity columns as appropriate. When you're ready to revert back to the original box you can restore a backup. Will need a little down time of course.

    I think you might find merge easier to work with since it supports identity ranges.

    Be interested to hear if you have other ideas..better ideas hopefully!

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thanks Andy - I may look into merge a little more before I rollout any changes.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply