PK violation in replication

  • I have replication set up between 2 servers and on the subscriber i see a pk violation error. The data exists as a single row on both source and destination so wondering why is it failing at subscriber end. What surpises me is when source has only 1 row and that is already replicated on subscriber why is the same row getting picked up again in spMSins_ stored proc.any clues will be greatly appreciated.

    TIA

  • what kind of replication you are trying to use! Trasaction, merge or snapshot! in transaction if that error comes then you have to go manually to change that data or delete that data and then try to run replication again because it will not get successfull until you fix that row! that's how i have done it!

  • We do have transactional replication but we have done this manual deletion a few times before too. and this is happeneing to one specific table only. Since its pretty likely it can happen again is there any other solution that you can suggest?

    TIA

  • one solution is there that delete the replication and dts all the data from one server to another server and then recreate the replication. it might help!

    Take Care.

  • But heer i am trying to figure out why this happened and how can i check for this?

  • You should check (on both sides) if your have same rowguid value for given PK
  • If your PK is an IDENTITY, make sure it is 'NOT FOR REPLICTION'.  Also, for transactional replication verify that the subscriber is not being updated or inserted to.

    HTH

    Jason

    Jason

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

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