Export (0) Print
Expand All
Expand Minimize

sp_change_agent_parameter

SQL Server 2000

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:

  • bcpbatchsize

  • historyverboselevel

  • logintimeout

  • maxbcpthreads

  • querytimeout

    For a Log Reader Agent, which has a value of 2 in the agent_type field, the following properties can be changed:

  • historyverboselevel

  • logintimeout

  • pollinginterval

  • querytimeout

  • readbatchsize

  • readbatchthreshold

    For a Distribution Agent, which has a value of 3 in the agent_type field, the following properties can be changed:

  • bcpbatchsize

  • commitbatchsize

  • commitbatchthreshold

  • historyverboselevel

  • logintimeout

  • maxbcpthreads

  • maxdeliveredtransactions

  • pollinginterval

  • querytimeout

  • transactionsperhistory

  • skiperrors

    For a Merge Agent, which has a value of 4 in the agent_type field, the following properties can be changed:

  • pollinginterval

  • validateinterval

  • logintimeout

  • querytimeout

  • maxuploadchanges

  • maxdownloadchanges

  • uploadgenerationsperbatch

  • downloadgenerationsperbatch

  • uploadreadchangesperbatch

  • downloadreadchangesperbatch

  • uploadwritechangesperbatch

  • downloadwritechangesperbatch

  • validate

  • fastrowcount

  • historyverboselevel

  • changesperhistory

  • bcpbatchsize

  • numdeadlockretries

    For custom profiles, the parameters that can be changed depend on the parameters defined. To see what parameters have been defined, run sp_help_agent_profile to see the profile_name associated with the profile_id. With the appropriate profile_id, next run sp_help_agent_parameters using that profile_id to see the parameters associated with the profile.

[@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

Show:
© 2014 Microsoft