Identity issue

  • Hi,

    We have a table with identity column replicated which has NOT FOR REPLICATION set.

    To minimize the release time we remove the table from replication, insert the data on both the publisher and subscriber and put the replication back on without initializing it, assuming our data all in sync, as the application is down during the release.

    Sometimes, when inserting data (replication off), I get an error on the subscriber with violation of the PK constraint (the identity column).

    After investigation I find that the publisher has 653 records and the identity value is 653. The subscriber has 652 records and 652 value for the identity. It is missing the record, which failed to insert. When I reseed it to the same value of 652, the insert suddenly works.

    Any ideas why it would not work before?

    Thanks.

Viewing 0 posts

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