all groups > sql server replication > march 2005 >
You're in the

sql server replication

group:

order of merge replication, batches and generations


order of merge replication, batches and generations Marco Broenink
3/14/2005 5:37:13 AM
sql server replication:
I have some questions about how the merge-agents deal with batches and its
effect on the order of merge replication.

As described in
http://support.microsoft.com/default.aspx?scid=KB;EN-US;307356 the processing
order of the merge agent can result in foreign key conflicts when Parent and
child changes are split across generation batches.

In my db-system, when inserting large volumes of data, these foreign key
conflicts occur when replicating. So I have increased the
-UploadGenerationsPerBatch and -DownloadGenerationsPerBatch parameters to
their maximum of 2000. But the foreign key conflicts keep happening.

I don't understand this, because when I check the MsMerge contents table,
there are not even 2000 generations. This table contains 122 generations and
10500 datachanges.

My questions are:
- Why do I keep the FK conflicts, while the number of generations is below
2000 ?
- Is there also a maximum to the number of changes in a batch?
- What do the parameters MaxDownloadChanges, MaxUploadChanges,
UploadReadChangesPerBatch, DownloadReadChangesPerBatch,
UploadWriteChangesPerBatch, DownloadWriteChangesPerBatch mean with regard to
the parameters UploadGenerationsPerBatch, DownloadGenerationsPerBatch ?
These params seems to conflict eachother.

Unfortunately setting the foreign keys on NOT FOR REPLICATION is not a good
option for my db-system.

thanks in advance,

Marco Broenink

RE: order of merge replication, batches and generations Jim Breffni
3/14/2005 1:19:02 PM
setting the foreign keys on NOT FOR REPLICATION is the ideal solution

Your foreign keys still operate as designed so your relationships are
maintained - they are only ignored when replication is doing its thing.


Jim.



[quoted text, click to view]
AddThis Social Bookmark Button