Somehow two rows in a table that is party to merge replication are identical, including their rowguid
. I have no idea how this happened, it is only with two rows in my entire database (which is used in production).
No matter how I try to delete them, I get the following error:
Msg 2601, Level 14, State 1, Procedure MSmerge_del_12B5E838BB91458D81AD66DD7EB5ABDC, Line 46 Cannot insert duplicate key row in object 'dbo.MSmerge_tombstone' with unique index 'uc1MSmerge_tombstone'. The duplicate key value is (7094001, df2e61b2-3d8e-e511-84bb-00155d00c1da). The statement has been terminated.
This is somewhat expected, but I have no idea how to get around it. I'd very much like to avoid dropping anything big (i.e. replication, tables, etc.). This is an isolated case and I don't expect it to happen again so I don't mind doing a manual work-around.
Can anyone provide some insight into this?
Thanks!
KEEP_REPLICATION
? You rarely hit a dupe indbo.MSmerge_tombstone
unless a database is restored.KEEP_REPLICATION
enabled. I will keep that in mind for future restores, if necessary. Is there a way to correct this now though?uc1MSmerge_tombstone
to see if it fixes the problem ?