Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Violation of Primary Key in Merge Replication

$
0
0

I have one Publisher and one Subscriber. They haveUK (Col1, Col2), PK is col1 + col2, and the MERGE REPLICATION adds a ROWGUID. Sometimes they insert the same row when they are offline ( they generate the same UK, it's not IDENTITY column), because of it, they generate different ROWGUID for the same row. Then, when I run the JOB for Merge Replication, I have a PRIMARY KEY violationI need to use the UK instead of ROWGUID. It is possible?

Example:

Table_1 (Publisher)
Name: John (UK)
ID: 1234 (UK)
ROWGUID: xxxxx (Created by Merge Replication)

Table_1 (Subscriber)
Name: John (UK)
ID: 1234 (UK)
ROWGUID: yyyyy (Created by Merge Replication)



Viewing all articles
Browse latest Browse all 4054

Trending Articles



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