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,不含預設值,而且可以是下列其中一個值。

Description
1 快照集代理程式。
2 記錄讀取器代理程式。
3 散發代理程式。
4 合併代理程式。
9 佇列讀取器代理程式。

[ @agent_id = ] agent_id

代理程式的識別碼。 @agent_id為 int,沒有預設值。

[ @profile_id = ] profile_id

代理程式應該使用的配置檔識別碼。 @profile_id為 int,沒有預設值。 若要檢視為每個代理程式定義的設定檔案清單,請使用 sp_help_agent_profile (Transact-SQL) 。 如需系統配置檔的詳細資訊,請參閱 複寫代理程式配置檔

傳回碼值

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

備註

sp_update_agent_profile 用於所有類型的複寫。

權限

只有系統管理員固定伺服器角色的成員才能執行 sp_update_agent_profile