Results 1 to 2 of 2

Thread: Replication fails with primary key violation error

  1. #1
    Teresa Schroat Guest

    Replication fails with primary key violation error

    I have a publication that has been working great for over eight months. I have on occassion had to stop publishing and stop subscribing in normal operation without problems.

    Yesterday, I ran into a problem that I am not sure how to solve.

    I keep getting a distribution task failure "Violation of Primary Key constraint 'aaaashipm_pk'. Attempt to insert duplicate key in object shipm failed while bulk copying into shipm

    Anyone run across this or have any suggestions -- do I have a transaction log problem, distribution data base/log problem. I have checked the identity column to make sure its not out of sync, run a check on the table to make sure its not corrupted. I have a couple of other things I am trying but was curious if anyone else had come across this?

    Will let you know if I find a solution but it doesn't look good.

  2. #2
    Join Date
    Dec 2010
    Posts
    1

    Primary Key Violation

    It's Happened due to the Primary Key already existing in the Subscriber side. when it trying to replace the data in that Particular field both the Primary Keys are getting collided. So you are getting that Error. There are so many ways to come out from this Error. The best one is :

    Drop that Table in Subscriber side and Reintialize that Table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •