Removes transactions from the distribution database tables after they have been successfully distributed to the subscriber's database.
sp_replcleanup publisher, subscriber, retention
where
The sp_replcleanup stored procedure cleans up jobs for the specified publisher/subscriber pair. It is run on the distribution database and removes entries from these destination database tables: MSjob_commands, MSjobs, MSsubscriber_status, and MSsubscriber_jobs.
Important Each distribution database is automatically cleaned up once a day. There is a default subscriber cleanup task (which has a large overhead) that is scheduled by default to run daily at 1:05 A.M.
This example "cleans up" (removes transactions from) the distribution database tables on the AIREDALE server after they have been successfully distributed to the server WOLFHOUND and retains transactions for at least 8 hours.
sp_replcleanup AIREDALE, WOLFHOUND, 8
Execute permission defaults to the system administrator.
MSjob_commands, MSjobs, MSsubscriber_status, MSsubscriber_jobs
sp_replsync | sp_replica |
sp_distcounters |