sp_add_agent_profile (T-SQL)

Creates a new profile for a replication agent.

Syntax

sp_add_agent_profile [[@profile_id =] profile_id OUTPUT]
    {,[@profile_name =] 'profile_name' [,[@agent_type =] 'agent_type'}
    [,[@profile_type =] profile_type] {,[@description =] 'description',}
    [,[@default =] default]

Arguments
[@profile_id =] profile_id
Is the ID associated with the newly inserted profile. profile_id is int and is an optional OUTPUT parameter. If specified, the value is set to the new profile ID.
[@profile_name =] 'profile_name'
Is the name of the profile. profile_name is sysname, with no default.
[@agent_type =] 'agent_type'
Is the type of agent. agent_type is int, with no default, and can be one of these values.

 

Value Description
1 Snapshot Agent
2 Log Reader Agent
3 Distribution Agent
4 Merge Agent

[@profile_type =] profile_type
Is the type of profile. profile_type is int, with a default of 0. 0 indicates a system profile. 1 indicates a custom profile.
[@description =] 'description'
Is a description of the profile. description is nvarchar(3000), with no default.
[@default =] default
Indicates whether the profile is the default for agent_type. default is bit, with a default of 0. 0 indicates that the profile is not a default. 1 indicates a default profile.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_add_agent_profile is used in snapshot, transactional, and merge replication.

A row is added for the configuration in the MSagent_profiles table.

Permissions

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

See Also
sp_add_agent_parameter sp_change_agent_profile
sp_change_agent_parameter sp_drop_agent_profile
sp_drop_agent_parameter sp_help_agent_profile
sp_help_agent_parameter System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.