The information in this article applies to:
SYMPTOMSIn SQL Server 6.5, the default schedule for cleanup is once a day, at 1:05 A.M. This means that it removes 24 hours' worth of entries in MSjobs, MSjob_commands, MSsubscriber_jobs, and MSsubscriber_status at once. In high-volume replication installations, this results in the deletion of a huge amount of data in a single transaction, thereby consuming a great deal of resources, such as memory, locks, and log space, and it could possibly block other replication tasks. WORKAROUND
To work around this problem, you can schedule the cleanup task to run more frequently, so that it has less information to remove at each execution. In cases in which this is a problem, you can use a wrapper procedure to call sp_replcleanup with a retention value in steps so that cleanup does its work in batches.
In the cleanup task, you must call this procedure instead of sp_replcleanup. The command portion should look like:
where <step_size> can be any value, preferably a number that 24 will divide by evenly.
MORE INFORMATIONNOTE: Be sure to test this procedure before putting it into production use. You may want to add more checks to handle cases in which step_size is greater than retention or other possible error conditions. This is intended to be a sample for calling sp_replcleanup in steps. Hence, if you run into any problems due to this procedure, you will have to revert back to the original setup of the cleanup task. Additional query words: repl tran xact proc sproc st sp
Keywords : kbSQLServ650 kbDSupport |
Last Reviewed: January 11, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |