Its kind of difficult to explain, basically a trigger is fired. This trigger
will write an entry to MSMerge_Contents if its an update or an insert, and
MSMerge_tombstone if its a delete. Then the merge agent runs. First off it
checks to see if it needs to update any identity values and if it needs to
it does. Then it updates gen_cur in the sysmergearticles table. Any DML
occurring on the subscriber at this time will have a different generation
value and will not be processed as part of the batches which form the sync.
Then the merge agent checks to see if the previous sync was interrupted. If
it was interrupted it gathers all the unprocessed entries in
MSMerge_Contents and MSMerge_Tombstone and ups their generation value.
It then figures out what rows in MSMerge_Tombstone and then MSMerge_Contents
to send to the publisher. It check msrepl_info for this info. It then sends
these rows on a article basis to the publisher. The publisher then gathers
together all rows for the partition that would be sent to the subscriber. A
partition is rows in MSmerge_Contents and MSMerge_Tombstone which are not
filtered out by the filter clause if any.
It then compares the rowguids coming from the subscriber with the rowguid on
the publisher and figures out what is missing on either side and fires procs
to push them on whatever side does not have them. Primary key collisions may
occur at this point and if so are logged to the conflict tables. Updates and
Delete conflicts are detected by having the same GUID values in the
publisher batch and subscriber batch. These rows are logged to the conflict
tables and rolled back according to the conflict resolver mechanism you have
employed.
After the sync process has completed the next batch is processed and the
process repeats itself.
The reason your synchronization takes so long is difficult to say. Run
profiler and see what is going on in your database on the publisher and
subscriber. It could be a network problem. You could be bumping into
replication non-convergence.
--
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] "Tejas Parikh" <TejasParikh@discussions.microsoft.com> wrote in message
news:69C25A19-7425-4AFC-9C15-93A4069FCCB3@microsoft.com...
> Hey. I've my merge agent to run on continous. I make some change at the
> publisher and wait for it to replicate over but it takes about 9 to 10
> minutes to replicate over. Can someone tell me why it takes so long? What
> are
> the steps involved after the change is made to the publisher side. a flow
> chart kind of thing.
> where does the change go between the publisher and before the change
> actually hits the subscriber?
>
> Thank you