Re: Transaction and commands question



What you need to have a look at is MaxCmdsInTrans for the log reader agent.
What this will do is extract commands from a transaction logged in the log
reader as they are found and send them to the distribution database.

So for a value of 1000, it will read 1000 commands out of the transaction
and send them to the distribution database while the transaction is
proceeding. If you don't use this switch, these commands will be read when
the transaction is committed. The problem is that if the transaction is
rolled back, the commands are still in the distribution db.

If you don't use the switch they will be applied within a single transaction
in batches of 100 IIRC, or whatever the setting is for
commitbatchsizethreshold.

So 1 transaction, but within that transaction are 500 batches of 100
commands.

HTH

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



"Hassan" <Hassan@xxxxxxxxxxx> wrote in message
news:edeNAXXSGHA.4952@xxxxxxxxxxxxxxxxxxxxxxx
Using distribution agent for transactional replication.

Say if i have a single transaction that inserts 50000 rows.

And my default profile for the distrib agent is set to 100 for
commitbatchzise and 1000 for commitbatchthreshold.

So how does replication flow these 50000 commands ? How many
batches/transaction and how many rows/transaction ?

Will it do it like 100 transactions and 500 commands ?

Also will it do them all together before it commits ?

Just a bit confused here.

Thanks



.



Relevant Pages

  • Re: Transaction.Commit() and Transaction.Rollback()
    ... They are used to ensure that an entire group of commands succeeds or else none of them succeed. ... This is done through the use of a transaction log. ... The Begin Transaction, Commit Transaction, End Transaction & Rollback Transaction commands are ways to specify which groups of queries to treat as Atomic. ... Commit & End Transaction tells the database that your are finished with that atomic operation and that all the commands you had sent since the trasaction began should now get committed to the actual database tables. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: dbf trashing problem after upgrade
    ... FLUSH doesn't work on disks that have an active Write cache, ... Tha'ts why VFP in recent versions has added commands like SYS'Purge ... data modifications or as the BEGIN TRANSACTION - END TRANSACTION / ROLLBACK ... the terminals share a DBF on the server. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: dbf trashing problem after upgrade
    ... i will do some testing with the commands you mentioned and let you know of ... > Hi Anis ... > FLUSH doesn't work on disks that have an active Write cache, ... > data modifications or as the BEGIN TRANSACTION - END TRANSACTION / ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Typed Dataset and transactions in ADO.NET 2.0
    ... Maybe this style...just across a couple of commands ... SqlTransaction trans; ... bReturnLog = ErrorLog.ErrorRoutine; ... I have a general question about typed datased and transaction. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: How to Pause/Resume Transactional Replication
    ... is recorded in the transaction log. ... distribution database where it stays until read by the ... Paul Ibison SQL Server MVP, ...
    (microsoft.public.sqlserver.replication)