can’t insert duplicate key to ‘subscriber’’ or a can’t insert because of a duplicate key


This error message ‘can’t insert duplicate key to ‘subscriber’’ or a can’t insert because of a duplicate key message pertain to a record that is trying to be inserted that previously existed.

The primary reason this can occur is if two publications are set up containing the same article which are pushing data to the same location.

  • If the article exists in more than one publication:
    • Delete one of the articles if it is contained in multiple publications
        • Re-push a snapshot only if you are unable to delete duplicate transactions from the msrepl_transactions table and the msrepl_commands table in the distribution database.  This can be done by following the same steps listed in section here
      • If the article does not exist in more than one publication:
        • Delete the duplicate transaction causing the error in both the msrepl_transactions table and the msrepl_commands table in the distribution database.  This can be done by following the same steps listed in section here
      • Start the agent
Advertisements
This entry was posted in Replication. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s