Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Jan 26, 2001

Transactional Replication - Running in Non-Continous Mode

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.

MS SQL Archives

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM