sp_enableagentoffload (Transact-SQL)

Enables remote agent activation of the replication push agent that is identified by the @job_id parameter. This stored procedure is run at the computer that is currently the remote agent server. This stored procedure is executed at the Publisher on the publication database.

Important

Support for remote agent activation has been dropped for Distributors running Microsoft SQL Server 2005 and later.

Topic link iconTransact-SQL Syntax Conventions

Syntax

sp_enableagentoffload [ @job_id = ] job_id
    [ , [ @offloadserver = ] 'remote_agent_server_name' ]
    [ , [ @agent_type = ] 'agent_type' ]

Arguments

  • [ @job_id=] 'job_id'
    Specifies the SQL Server Agent job identifier of the replication agent to be enabled for remote activation. job_idis varbinary(16), with no default.
  • [ @offloadserver=] 'remote_agent_server_name'
    Specifies the network name of server to be enabled for remote agent activation. remote_agent_server_nameis sysname, with a default of NULL. If NULL, then the current offload_server in the MSDistribution_agents table is used.
  • [ @agent_type=] 'agent_type'
    Is the type of agent. agent_type is sysname, with a default of NULL, which specifies that the system determines if the agent type is distribution or merge. Valid values are distribution or merge, or NULL.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_enableagentoffload is used to enable the running of the Distribution Agent or Merge Agent processing to another server.

Upon successful completion of sp_enableagentoffload, the –Offloadoffloadserver parameter is appended to the replication agent command line, or updated with the new 'remote_agent_server_name' if the –Offloadoffloadserver parameter already exists in the command line.

Also, the offload_enabled field for the agent in MSdistribution_agents (Transact-SQL) is set to 1, and the offload-server field is updated with the new value specified in the 'remote_agent_server_name', if provided.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role or the subscription owner of the specified agent can execute sp_enableagentoffload.

See Also

Reference

System Stored Procedures (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance