Avatar of motioneye
Flag for Singapore asked on

Push transactional replication fail with violation of primary key

I'm running transactional replication, distribution agent found fail due to the last action was duplicating, what should I do now to solve this kind of problem?
Microsoft SQL Server

Avatar of undefined
Last Comment

8/22/2022 - Mon


what is your sql server(s) version\edition\SP?

also check:
See related problem and solution:

"How to....... have 2 publications with one table in common?  "
  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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question