all groups > sql server replication > july 2007 >
You're in the

sql server replication

group:

Insert Conflicts



Insert Conflicts Maer
7/27/2007 4:04:32 PM
sql server replication: Hi - When synchronizing, the following conflict occurred:

INSERT statement conflicted with COLUMN FOREIGN KEY constraint
'FK_ContraintName'. The conflict occurred in database 'DatabaseName', table
'TableName', column 'PrimaryKeyCol'.

The row was inserted at the publisher but since it could not insert the
row at the subscriber, the row was added to the conflict table.

Here is the problem: when I go to the subscriber and look at the parent
table, the parent row exists. I was actually able to manually insert a row
using the same PrimaryKeyCol value and there was no conflict. So it looks
like this is happening only when synchronizing.

Is there something that I am overlooking that could be causing this?

Thank you,

Maer



Re: Insert Conflicts Hilary Cotter
7/28/2007 12:00:00 AM
You need to put a not for replication property on your constraints.

Your problem is that with merge replication rows are sync'd according to
their article id as opposed to the order they are inserted in, so they might
be inserted out of order.

--
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]

Re: Insert Conflicts Maer
7/30/2007 3:08:46 PM
Thank you, Hilary. So basically the reason why I didn't run into this
problem is by sheer fluke since I am not guaranteed that the inserts will be
in order. Wow, this is good to know.

Maer


[quoted text, click to view]

AddThis Social Bookmark Button