sp_stop_rep_agent

Shuts down the RepAgent thread for the specified database.

Syntax

sp_stop_rep_agent dbname[, 'nowait']

Parameters

Examples

Usage

  • Use sp_stop_rep_agent with RepAgent-enabled databases.

  • Once you have used sp_stop_rep_agent to shut down RepAgent, it does not automatically start up when the database comes online during server startup. To re-enable automatic startup, execute the sp_start_rep_agent procedure.

  • sp_stop_rep_agent is asynchronous and may take some time to execute. Use sp_who to check the status of the RepAgent.

Permissions

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

Related reference
sp_config_rep_agent
sp_help_rep_agent
sp_start_rep_agent