Monday, March 19, 2012

Back to basic question

And forgive me for asking this over and over again..
My distribution agent states " 1 transaction with 100,000 commands were
delivered "
My default profile has the Commitbatchsize as 100 and CommitBatchThreshold
as 1000.
So in this case, how does distribution agent work ? Does it read/buffer all
the 100,000 commands from msrepl_commands since its 1 transaction before it
fires them off to the subscriber ?
And how does the default profile play a role here ? If it does read/buffers
100,000 commands before it pushes it across, does it commit 1000 commands at
a time on the subscriber due to the commitbatchthreshold ? And if if fails
halfway saying after inserting 50,000 commands, does it just rollback the
last few commands that were not committed or does it rollback all 50,000
commands ?
Using transactional replication
Hassan,
why not do a test of these parameters? If you have Lumigent's logreader, you
can use it on the the live subscriber transaction log to verify the
behaviour for yourself. Create and publish a 100 record test table on the
publisher, modify the Commitbatchsize and CommitBatchThreshold parameters
and make an update of the 100 records. There's no need for an explicit
transaction, just an update of the table that affects all rows is ordinarily
logged as 100 updates with a begin and commit surrounding it. Start the
distribution agent then check Lumigent's output. The same setup can be used
for interrupted commands.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment