Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Non_Continuous Replication

By Andy Warren,

If you've used transactional replication you're probably familiar with the step in the wizard where you have to pick either continuous or scheduled for the distribution agent. I would guess that most subscriptions are set up to replicate continuously - mainly because it is the default option. Changing to use scheduled can reduce the overhead on your server, but with a corresponding trade off in latency.

Interestingly, regardless of which you pick the log reader runs in continuous mode. This is the command line from a job for a scheduled subscription:

-Publisher [ANDY] -PublisherDB [DEADLOCK] -Distributor [ANDY] -DistributorSecurityMode 1 -Continuous

Note the '-Continuous' parameter. This means that even though you have scheduled the subscription to distribute transactions to the subscriber, the log reader is always monitoring the log and writing transactions to the Distribution database. Each log reader agent (logread.exe, one per publication) consumes about 1700k of memory. It's not a huge savings, but shutting these down will free up some memory and further reduce the load on the server.

But if you turn off the log reader won't you lose transactions? No, even if you have the log set to truncate on checkpoint the transactions remain in the log until the log reader has had a chance to process them.

If you can afford the latency, just edit each log reader job and remove the '-continous' from the end of step #2. Then take a look at all of your log reader and distribution agent jobs that will be running non-continuously. Ideally you want to adjust the schedule so that the log reader runs, then the distribution agent, then the next log reader, etc. By doing so you keep the lowest possible load on your server while still keeping your subscribers updated fairly often, just not instantly. If you have a large number of subscriptions scheduling can get pretty complicated, a subject I'll address in a future article.

Total article views: 4695 | Views in the last 30 days: 4
 
Related Articles
FORUM

Distributed transaction

Distributed transaction

FORUM

Distributed Transaction

Distributed Transaction with locking hint

FORUM

sql server transaction replication - run continuously

sql server transaction replication - run continuously

FORUM

ERROR USING DISTRIBUTED TRANSACTION........

ERROR USING DISTRIBUTED TRANSACTION........

FORUM

Error using Begin Distributed Transaction.....

Error using Begin Distributed Transaction.....

Tags
replication    
sql server 6.5    
sql server 7    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones