Discussion:
Rows Deleting after a FK violation at subscriber
(too old to reply)
Joseph
2010-05-26 21:58:31 UTC
Permalink
2000 Merge Replication. Publisher, SubscriberA, SubscriberB

I have a baffling situation I'm hoping someone can shine a little
light on...Any help would be geratly appreciated! I still haven't
given up on the newsgroups!

First I insert into a Primary Key Table. I then "use" these values to
insert into another table that has an FK constraint on the PK table.

SubsriberA syncronizes fine, and gets all the data.

An hour later, SubscriberB tries, and fails. It fails because the PK
rows aren't there (yet?).

This seems to start a chain reaction, where upon the next time SubA
syncs, it deletes the rows in this second table, and that causes them
to be deleted from the publisher.

So, two hours later (SubB syncs every hour), the rows from the
publisher are gone! This worries me greatly, as to what else can be
deleted.

Does anyone know why the PK inserts may be failing, or occuring out of
order?
Does anyone know how to monitor for this stuff? IE, I still can't
find out where these error messages (FK violations) are being stored
in the case of Replication.

Thanks in Advance!!
Paul Ibison
2010-06-15 07:16:30 UTC
Permalink
Have a look at the conflict viewer to see if the PK records are being rolled
back due to a compensating change. if not, then check that the PK/FK
relationship is declared on the publisher - this will determine the order
(via nicknames) of application of these changes at the subscriber.
HTH,
Paul Ibison

Loading...