Updates the record that identifies the server's last distributed transaction.
sp_repldone page, row [, timestamp] [, numtrans] [, time] [, reset]
where
Valid only when page is 0 and row is 0.
This replication stored procedure is used by the logreader process to keep track of which transactions have been distributed.
Caution If you execute this stored procedure manually, you can invalidate the order and consistency of delivered transactions.
With this stored procedure, you can manually tell the server that a transaction has been replicated (sent to the distribution server). It also allows you to change the transaction marked as the next one awaiting replication¾you can move forward or backward in the list of replicated transactions. (All transactions less than or equal to that transaction will be marked as distributed.)
The required parameters page and row can be obtained using the sp_repltrans or sp_replcmds replication stored procedures.
When page is 0, row is 0, and reset is 1, all replicated transactions in the log are marked as distributed. This is useful when there are replicated transactions in the transaction log that are no longer valid (for example, a published table has been dropped) and you want to truncate the log. For example:
sp_repldone 0, 0, NULL, 0, 0, 1
When page is 0, row is 0, and reset is 0, the transaction log is reset to the first replicated transaction and no replicated transactions are marked as distributed. This is useful if you want to scan the transaction log's replicated transactions. For example:
sp_repldone 0, 0, 0, NULL, 0, 0, 0
Or, because these are all default settings:
sp_repldone
Execute permission defaults to the system administrator.
None.
sp_replcmds | sp_replstatus |
sp_replflush | sp_repltrans |