SqlServer 更改複製代理設定檔參數,sqlserver設定檔

來源:互聯網
上載者:User

SqlServer 更改複製代理設定檔參數,sqlserver設定檔

由於經常需要同步測試並更改代理設定檔屬性,所以總結成指令碼,方便測試.


代理配置參數位置:



裡面的參數是需要更改的,未顯示的參數,則是沒有添加到設定檔的。但是取消上面的勾選是可以看到還有那些配置參數。


使用複製代理設定檔參考:https://msdn.microsoft.com/zh-cn/library/ms147893(v=sql.100).aspx


查看複製代理設定檔(MSagent_profiles)

select * from msdb.dbo.MSagent_profiles



查看指定代理的設定檔 (在散發者任何資料庫執行)

exec sp_help_agent_profile @agent_type = 9 --9為佇列讀取器代理程式


更改儲存在MSagent_profiles表中的設定檔描述 (在散發者任何資料庫執行)

exec sp_change_agent_profile  @profile_id = 11 ,@property = 'description',@value = '用於已複製的排隊事務讀取器的代理設定檔。'


增加代理設定檔的參數 (在散發者任何資料庫執行)

exec sp_add_agent_parameter  @profile_id = 11--設定檔的 ID,@parameter_name = 'ResolverState'--參數名稱,@parameter_value = 1--參數值


更改代理設定檔的參數 (在散發者任何資料庫執行)

exec sp_change_agent_parameter  @profile_id = 11--設定檔的 ID,@parameter_name = 'ResolverState'--參數名稱,@parameter_value = 2--參數值(衝突以訂閱伺服器為準)


更多參數參考:複製代理


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.