sp_help_rep_agent

Description

Displays static and dynamic information about a RepAgent thread.

Syntax

sp_help_rep_agent [dbname[, 'recovery' | 'config' | 'process' | 'scan' | 'security' | 'all']]

Parameters

dbname

The name of the database with the RepAgent for which you want information.

recovery

Displays recovery status information about the RepAgent.

config

Displays configuration information about the RepAgent.

process

Displays information about the RepAgent process.

scan

Displays log-scanning information about the RepAgent.

security

Displays current settings of the network-based security mechanism.

all

Displays all the preceding information for the RepAgent connected to the specified database.

Examples

Example 1

Displays recovery information.

sp_help_rep_agent pubs2, 'recovery'
Rep Agent Recovery Status
dbname  connect     connect  status    rs servername  rs username 
         dataserver  database             
 ------  ----------  -------- ------    -------------  -----------
 pubs2   sqlserver1   pubs2    scanning  repsvr1        repusr1

Example 2

Displays process information.

sp_help_rep_agent pubs2, 'process'
Rep Agent Process Status
dbname  spid   sleep status  retry count   last error
-----   ----   ------------  ----------    ----------   
pubs2   40     not sleeping  0             0

Example 3

Displays scanning information.

sp_help_rep_agent pubs2, 'scan'
Replication Agent Scan status
-----------------------------
dbname start marker end marker current marker log recs scanned oldest trans.
-------------------------------------------------------------------------
pubs2  (472675,13) (278622,0) (265736,16)          890       (472675,13)

Usage

Permissions

sp_help_rep_agent requires “sa” or “dbo” permission or replication_role.

See also

sp_config_rep_agent, sp_start_rep_agent, sp_stop_rep_agent