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

sql server replication : Synch failures cause deletes in FK table


David
1/27/2006 1:07:20 PM
We are experiencing lost records in some FK tables and I don't know if it
can be caused by synching failures. For example, we have a table named
People that is created and then a 2nd table record is created with a FK
(ApplicantInfo) that links to the PK on the People table. For some reason,
the 2nd table record gets created, but then mysteriously gets lost later
that day or the next day. Can anything in synch be doing this and if so,
where can I find it? I looked in the conflicts, but there is nothing there
for that 2nd table for these new records. Thanks.

David

David Chase
1/27/2006 2:25:21 PM
I have new information on this. I tested the process here and got the error
below (found in conflict viewer) when synching the distributor:

The row was inserted at 'LIFEDEVTEST.MCFIData' but could not be inserted at
'DELLGX260.MCFIData'. Transaction (Process ID 53) was deadlocked on lock
resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.



p.s. LIFEDEVTEST is the Publisher and DELLGX620 is the Subscriber.



Then I looked up the record on the main table of the Publisher and it was
still there.

Next, I went into conflict viewer and said "Keep the winning change" which
was the Publisher.

Next, I restarted the subscriber workstation and syncronized again. I got a
message that a record was deleted!!!!

I looked on both the Publisher AND Subscriber and the record was gone on
both!



Help.



David






[quoted text, click to view]

David
1/27/2006 4:47:04 PM
Where is that setting? Thanks.

David
[quoted text, click to view]

David
1/27/2006 4:54:03 PM
How do these things happen when you merely accept all of the defaults when
setting up replication?

David
[quoted text, click to view]

Hilary Cotter
1/27/2006 5:08:07 PM
This looks like a system delete. Change compensate_for_errors to false

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

Hilary Cotter
1/27/2006 7:55:40 PM
the default in SQL 2000 is true, in SQL 2005 its false. Microsoft's defaults
are very carefully field tested to ensure that they match the majority of
their customers needs.
--
Hilary Cotter
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]

Hilary Cotter
1/28/2006 12:00:00 AM
sp_addmergearticle

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

David Chase
1/28/2006 10:45:24 AM
Thanks. Is there a setting also when I initially create/publish the
articles?
David

[quoted text, click to view]

Hilary Cotter
1/28/2006 1:13:02 PM
No, that's the only one.

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

AddThis Social Bookmark Button