Merge Replication Problem

Last Post 03 Mar 2004 07:22 AM by talltop. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
hlljs
New Member
New Member

--
02 Mar 2004 06:25 AM
I have set up merge rep between two 2000 machines. Machine A is the online one that is processing transactions. Machine B is a standby. Replication occurs continously. Machine A is the only server receiving data currently. I have a data structure of a main table with about 10 sub tables related to the main table. When i add an account which puts data in all tables it inserts fine into Machine A. When it is replicated to B some of the data is taken out of the tables on Machine A, put into the conflict table for the particular table. This never happens to the main table just the sub tables and not all of the sub tables. for one transaction it may be subtable 1 3 and 5, for another it could be different sub tables. I looked at the error message on some of these conflicts and there is something wrong with the relationship. it gives an error message that usually means that there is no record in the main table. What is going on? Is the replication inserting the data in the same order that I did or is it trying to insert some of the sub records before the main records? will disabling the enforce relation for replicaton on all relationships help this?
talltop
New Member
New Member

--
03 Mar 2004 07:22 AM
Very well could be. Which is exactly why I always set all of my foreign key constraints on replicated tables to NFR(NOT FOR REPLICATION). You can do this either by T-SQL code or by just unchecking the checkbox in the EM on the individual constraints. If you do this though make sure you included all related tables in your publication so that your data will not get out of sync at your subscribers. You might also want to set NFR on your table triggers as well, these things will cause you alot less trouble when replicating data to subscribers. Replication is a process that you must prepare your tables for first, otherwise it will continually give you heartburn.

-------------------------------------
Travis Lee Alltop
SQL Server DBA
You are not authorized to post a reply.

Acceptable Use Policy