Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Merge Replication Primary Key Violation

$
0
0

I have a Publisher and a Subscriber, Sometimes they insert the same row at the same time, when I run the JOB for Merge Replication I have a PRIMARY KEY violation.

I have a UK (Col1, Col2), a PK (uniqueidentifier) and the MERGE REPLICATION adds a ROWGUID. The problem is that when they add at the same time (but not connected one to another), they generate the same UK, but the ROWGUID is different. I need to use the UK instead of ROWGUID. I'm NOT using IDENTITY column.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>