sp_browsereplcmds (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sp_browsereplcmds (Transact-SQL)

 

Applies To: SQL Server

Returns a result set in a readable version of the replicated commands stored in the distribution database, and is used as a diagnostic tool. This stored procedure is executed at the Distributor on the distribution database.

Topic link icon Transact-SQL Syntax Conventions


sp_browsereplcmds [ [ @xact_seqno_start = ] 'xact_seqno_start' ]
    [ , [ @xact_seqno_end = ] 'xact_seqno_end' ] 
    [ , [ @originator_id = ] 'originator_id' ]
    [ , [ @publisher_database_id = ] 'publisher_database_id' ]
    [ , [ @article_id = ] 'article_id' ]
    [ , [ @command_id= ] command_id ]
    [ , [ @agent_id = ] agent_id ]
    [ , [ @compatibility_level = ] compatibility_level ]

[ @xact_seqno_start =] 'xact_seqno_start'
Specifies the lowest valued exact sequence number to return. xact_seqno_start is nchar(22), with a default of 0x00000000000000000000.

[ @xact_seqno_end =] 'xact_seqno_end'
Specifies the highest exact sequence number to return. xact_seqno_end is nchar(22), with a default of 0xFFFFFFFFFFFFFFFFFFFF.

[ @originator_id =] 'originator_id'
Specifies if commands with the specified originator_id are returned. originator_id is int, with a default of NULL.

[ @publisher_database_id =] 'publisher_database_id'
Specifies if commands with the specified publisher_database_id are returned. publisher_database_id is int, with a default of NULL.

[ @article_id =] 'article_id'
Specifies if commands with the specified article_id are returned. article_id is int, with a default of NULL.

[ @command_id =] command_id
Is the location of the command in MSrepl_commands (Transact-SQL) to be decoded. command_id is int, with a default of NULL. If specified, all other parameters must be specified also, and xact_seqno_startmust be identical to xact_seqno_end.

[ @agent_id =] agent_id
Specifies that only commands for a specific replication agent are returned. agent_id is int, with a default value of NULL.

[ @compatibility_level =] compatibility_level
Is the version of Microsoft SQL Server on which the compatibility_level is int, with a default value of 9000000.

0 (success) or 1 (failure)

Column nameData typeDescription
xact_seqnovarbinary(16)Sequence number of the command.
originator_srvnamesysnameServer where the transaction originated.
originator_dbsysnameDatabase where the transaction originated.
article_idintID of the article.
typeintType of command.
partial_commandbitIndicates whether this is a partial command.
hashkeyintInternal use only.
originator_publication_idintID of the publication where the transaction originated.
originator_db_versionintVersion of the database where the transaction originated.
originator_lsnvarbinary(16)Identifies the log sequence number (LSN) for the command in the originating publication. Used in peer-to-peer transactional replication.
commandnvarchar(1024)Transact-SQL command.
command_idintID of the command in MSrepl_commands.

Long commands can be split across several rows in the result sets.

sp_browsereplcmds is used in transactional replication.

Only members of the sysadmin fixed server role or members of the db_owner or replmonitor fixed database roles on the distribution database can execute sp_browsereplcmds.

sp_replcmds (Transact-SQL)
sp_replshowcmds (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft