Groups | Blog | Home
all groups > sql server replication > april 2006 >

sql server replication : Crashing pk



Tigermikefl
4/20/2006 1:02:02 PM
I have a merge replicated table with a composite pk. One field unique id,
the other a float. SQL2Ksp4 and msde subs, anon.

I get conflicts 'The row was inserted at SERVER but could not be inserted
at SUBSCRIBER....Violation of PRIMARY KEY ...Cannot insert duplicate key in
object 'XXX'.'

This doesn't bother me if the subscriber re-insert fails, they already have
the data. However, it seems to do a double-delete to resolve the problem and
deletes the good row from the live Publisher. After reinserting again on the
Publisher, it eventually disappears again and repeats.

I switched to the 'later date wins' conflict resolver hoping for relief but
it didn't help. I could care less which guid wins, as long as one does.

How do I stop this cycle ?

--
Mike

Hilary Cotter
4/20/2006 4:55:29 PM
I think you need to look at partitioning, perhaps through identity ranges,
to prevent such collisions.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Paul Ibison
4/20/2006 9:16:44 PM
Please take a look at the compensating changes options:
http://support.microsoft.com/default.aspx?scid=kb;en-us;828637&Product=sql2k
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

AddThis Social Bookmark Button