sp_update_agent_profile (Transact-SQL)

适用于:SQL Server

更新复制代理所用的配置文件。 此存储过程在分发服务器上对分发数据库执行。

Transact-SQL 语法约定

语法

sp_update_agent_profile
    [ @agent_type = ] agent_type
    , [ @agent_id = ] agent_id
    , [ @profile_id = ] profile_id
[ ; ]

参数

[ @agent_type = ] agent_type

@agent_type为 int,无默认值。

代理的类型。 agent_type为 int,无默认值,可以是这些值之一。

说明
1 快照代理。
2 日志读取器代理。
3 分发代理。
4 合并代理。
9 队列读取器代理。

[ @agent_id = ] agent_id

代理的 ID。 @agent_idint,无默认值。

[ @profile_id = ] profile_id

代理应使用的配置文件的 ID。 @profile_id为 int,无默认值。 若要查看为每个代理定义的配置文件列表,请使用 sp_help_agent_profile (Transact-SQL)。 有关系统配置文件的详细信息,请参阅 复制代理配置文件

返回代码值

0(成功)或 1(失败)。

注解

sp_update_agent_profile用于所有类型的副本 (replica)。

权限

只有 sysadmin 固定服务器角色的成员才能执行sp_update_agent_profile