Share via


sp_update_agent_profile (Transact-SQL)

更新複寫代理程式所用的設定檔。 這個預存程序執行於散發資料庫的散發者端。

主題連結圖示 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,沒有預設值,而且可以是下列其中一個值。

    說明

    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 用於所有類型的複寫中。

權限

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

請參閱

參考

複寫代理程式設定檔

sp_add_agent_profile (Transact-SQL)

sp_change_agent_profile (Transact-SQL)

sp_drop_agent_profile (Transact-SQL)

sp_help_agent_profile (Transact-SQL)

系統預存程序 (Transact-SQL)