sp_replcmds Replication Stored Procedure

For SQL Server 6.5 information, see sp_replcmds in What's New for SQL Server 6.5.

Returns the commands for transactions marked for replication.

Syntax

sp_replcmds [maxtrans]

where

maxtrans
Is an integer indicating the number of transactions to return information about. If maxtrans is not provided, defaults to 1 (the next transaction waiting for distribution).

Remarks

This replication stored procedure is used by the logreader process. It returns information about the publication database from which it is executed. It allows you to view transactions currently not distributed (those transactions remaining in the transaction log that have not been sent to the distribution server), with their commands and it returns article ID, partial_command (true or false), the command, page, row, and timestamp.

Example

This example returns the commands for two transactions marked for replication.

sp_replcmds 2

Permission

Execute permission defaults to the system administrator.

Table Used

None.

See Also

sp_repldone sp_replstatus
sp_replflush sp_repltrans