The sp_repldone Procedure

Once the Log Reader Agent finishes calling sp_replcmds and writing new entries to MSrepl_commands and MSrepl_transactions, it calls sp_repldone to indicate that the specified log records have been successfully replicated (to the distributor). This allows SQL Server to purge the log records as necessary. (Log records for transactional replication articles cannot be purged until the articles are successfully replicated to the distributor.)

Note that you shouldn't execute sp_repldone manually. Doing so can invalidate the order and consistency of replicated transactions. If you run into an emergency situation where your transaction log is overflowing because replicated transactions refuse to be purged (and you're certain ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.