SqlServer changes the parameters of the replication agent configuration file, and the sqlserver configuration file

Source: Internet
Author: User

SqlServer changes the parameters of the replication agent configuration file, and the sqlserver configuration file

Because you often need to synchronize the test and change the attributes of the agent configuration file, it is summarized as a script to facilitate testing.


Proxy configuration parameter location:



Parameters must be changed. parameters not displayed are not added to the configuration file. However, if you deselect the above check box, you can see the configuration parameters.


Reference: https://msdn.microsoft.com/zh-cn/library/ms147893 (v = SQL .100). aspx


View the replication agent configuration file (MSagent_profiles)

select * from msdb.dbo.MSagent_profiles



View the configuration file of the specified proxy (executed on any database of the distributor)

Exec sp_help_agent_profile @ agent_type = 9 -- 9 is the Queue Reader Agent


Change the description of the configuration file stored in the MSagent_profiles table (executed in any database of the distributor)

Exec sp_change_agent_profile @ profile_id = 11, @ property = 'description', @ value = 'is the proxy configuration file for the replicated queuing transaction reader. '


Add parameters for the proxy configuration file (executed in any database on the distributor)

Exec sp_add_agent_parameter @ profile_id = 11 -- configuration file ID, @ parameter_name = 'resolverstate' -- Parameter Name, @ parameter_value = 1 -- Parameter Value


Change the parameters of the proxy configuration file (executed in any database on the distributor)

Exec sp_change_agent_parameter @ profile_id = 11 -- ID of the configuration file, @ parameter_name = 'resolverstate' -- Parameter Name, @ parameter_value = 2 -- parameter value (conflict is determined by the subscription server)


For more parameter reference: Copy proxy


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.