Transact-SQL Reference

sp_change_agent_parameter

Changes a parameter of a replication agent profile stored in MSagent_parameters. This stored procedure is executed at the Distributor where the agent is running, on any database.

Syntax

sp_change_agent_parameter [ @profile_id = ] profile_id
    , [ @parameter_name = ] 'parameter_name'
    , [ @parameter_value = ] 'parameter_value'

Arguments

[@profile_id =] profile_id,

Is the ID of the profile. profile_id is int, with no default.

[@parameter_name =] 'parameter_name'

Is the name of the parameter. parameter_name is sysname, with no default. For system profiles, the parameters that can be changed depend on the type of agent. To find out what type of agent this profile_id represents, find the profile_id in the Msagent_profiles table, and note the agent_type field value. For a Snapshot Agent, which has a value of 1 in the agent_type field, the following properties can be changed:

[@parameter_value =] 'parameter_value'

Is the new value of the parameter. parameter_value is nvarchar(255), with no default.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_change_agent_parameter is used in all types of replication.

Permissions

Only members of the sysadmin fixed server role can execute sp_change_agent_parameter.

See Also

Distribution Agent Profile

Log Reader Agent Profile

Merge Agent Profile

Snapshot Agent Profile

sp_add_agent_parameter

sp_drop_agent_parameter

sp_help_agent_parameter

System Stored Procedures