sp_helpsubscriptionerrors (Transact-SQL)

 

Applies To: SQL Server

Returns all transactional replication errors for a given subscription. This stored procedure is executed at the Distributor on the distribution database.

Topic link icon Transact-SQL Syntax Conventions

  
sp_helpsubscriptionerrors [ @publisher = ] 'publisher'  
        , [ @publisher_db = ] 'publisher_db'   
        , [ @publication = ] 'publication'   
        , [ @subscriber = ] 'subscriber'   
        , [ @subscriber_db = ] 'subscriber_db'  

[ @publisher= ] 'publisher'
Is the name of the Publisher. publisher is sysname, with no default.

[ @publisher_db= ] 'publisher_db'
Is the name of the publication database. publisher_db is sysname, with no default.

[ @publication= ] 'publication'
Is the name of the publication. publication is sysname, with no default.

[ @subscriber= ] 'subscriber'
Is the name of the Subscriber. subscriber is sysname, with no default.

[ @subscriber_db= ] 'subscriber_db'
Is the name of the subscription database. subscriber_db is sysname, with no default.

Column nameData typeDescription
idintID of the error.
timedatetimeTime the error occurred.
error_type_idintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
source_type_idintError source type ID.
source_namenvarchar(100)Name of the error source.
error_codesysnameError code.
error_textntextError message.
xact_seqnovarbinary(16)Starting transaction log sequence number of the failed execution batch. Used only by the Distribution Agents, this is the transaction log sequence number of the first transaction in the failed execution batch.
command_idintCommand ID of the failed execution batch. Used only by the Distribution Agents, this is the command ID of the first command in the failed execution batch.
session_idintID of the agent session in which the error occurred.

0 (success) or 1 (failure)

sp_helpsubscriptionerrors is used with snapshot and transactional replication.

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_helpsubscriptionerrors.

sp_helpsubscription (Transact-SQL)
sp_helpsubscription_properties (Transact-SQL)

Community Additions

ADD
Show: