Cannot Insert PK on replication

  • SQL Server 2000 sp3 and replicating from one sql to another sql

    I'm getting this error:-

    Violation of PRIMARY KEY constraint 'PK__@snapshot_seqnos__7EEA1708'. Cannot insert duplicate key in object '#7DF5F2CF'.

    How do I locate the table involved on that?

    thanks in advance

  • There are other ways that this problem can be FIXED. But depends upon size of Database. i did following 2 steps.

    1>Re-intialize

    2> Apply Snapshot.

    that fixed my PK error.

    i hope this help.

  • Sorry, forgot to mention about "sp_browsereplcmds" run this where your Distribution Database is & that will give you some more info.

  • I did re-initialize all and nothing same error:

    and

    I don't have that store procedure sp_browsereplcmds

    thanks

  • By any chance do you have same table added in 2 diffrent publication??

    What is your Identity range magement settings?

    The same table may be added to each publication. However, one of the publications will need to be set up as a no-sync and if you are using automatic range management you'll receive a PK error like this:

    Violation of PRIMARY KEY constraint 'PK__MSrepl_identity___4D5F7D71'. Cannot insert duplicate key in object 'MSrepl_identity_range'.

    So, on the upload-only publication you'll just need to disable automatic range management for your table article

    Hope this helps..

    --Reecha

  • Found that this has been reported as bug and resolved as well.

    I think this will solve your problem : http://support.microsoft.com/default.aspx?scid=kb;en-us;813494 

    --Reecha

Viewing 6 posts - 1 through 5 (of 5 total)

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