all groups > sql server replication > april 2006 >
You're in the

sql server replication

group:

Conflicts and Relationships



Conflicts and Relationships David Chase
4/13/2006 12:42:29 PM
sql server replication: Merge replication, SQL 2000.

We are getting conflicts when a laptop (subscriber) synchs with the network
(publisher) that indicates records in a table were not inserted due to
related records in another table were missing. The 2 tables are named
People and ApplicantInfo. When a record is added to People then a related
record is also added in ApplicantInfo (a one-to-one relationship). We have
this same relationship in other replicated tables and are not causing
conflicts. Can anyone help me to resolve this or give me more info to check
on? Thank you.

David Chase

Re: Conflicts and Relationships David
4/13/2006 3:28:38 PM
Ok, but does that affect data exchange? I do want the new records in both
tables to be inserted at the subscriber. Thanks.

Also, you mentioned interruption. I think the laptop user may have shut
down or cancelled in middle of synch. Do these things affect data integrity
or will it correct itself once the laptop is successful at synching? In
addition, what if the subscriber does not synch within the 14 days I have
setup before subscription is inactivated?

David

[quoted text, click to view]

Re: Conflicts and Relationships Paul Ibison
4/13/2006 9:16:34 PM
David,
Merge will try to do PK before FK inserts when the related tables are in the
same publication but there can be issues of ordering in the cases where
there is a circular relationship in the database and merge replication is
interrupted. So, you could set the NOT FOR REPLICATION attribute on the FK
in this case.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Re: Conflicts and Relationships Paul Ibison
4/14/2006 4:59:57 PM
David,
new records in both tables will be sent to the subscriber if both tables
are articles in the same publication and in this case PK records will be
done first. There are some exceptions (ring topologies) where data integrity
can be violated and in which the NFR attribute is required. If the
subscriber doesn't sync in time he'll have to reinitialize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)




Re: Conflicts and Relationships David
4/17/2006 2:53:11 PM
Paul,
This morning, one of the laptops came in and synched. The merge agent shows
5 deletes at Publisher on that synch. The laptop user did not delete any
records over the weekend. However, it just so happens that the FK records
(5 of them) are gone on the Publisher. I hope I can find the cause of this
as it is an ongoing problem, except last week when it happened the records
ended up in the conflict table. Not sure where to look next.

David
[quoted text, click to view]

Re: Conflicts and Relationships Paul Ibison
4/18/2006 12:00:00 AM
David,
I'm not really following this 100% buit it sounds like a compensating
changes issue:
http://support.microsoft.com/default.aspx?scid=kb;en-us;828637&Product=sql2k
My other thought is that it could be related to cascading DRI changes.
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