Original: SQL Server changes replication agent profile parameters and two conflicting policy settings
Since it is often necessary to synchronize tests and change agent profile properties, it is always scripted to facilitate testing.
There are two kinds of conflicting policies for updatable subscriptions: one is conflict in the publication, that is, when the subscription data is conflicting with the publication, and the other is in the subscription conflict, when the data is published to the subscription conflict.
Queue Reader Settings: conflict policy for publish to subscription
Agent Configuration parameter location:
The parameters inside are the parameters that need to be changed, which are not shown, and are not added to the configuration file. But canceling the tick above will see the configuration parameters as well.
using the replication agent Profile reference:https://msdn.microsoft.com/zh-cn/library/ms147893 (v=sql.100). aspx
View replication agent configuration files (msagent_profiles)
SELECT * FROM Msdb.dbo.MSagent_profiles
View the configuration file for the specified agent (executed at the Distributor on any database)
EXEC sp_help_agent_profile @agent_type = 9--9 for Queue Reader Agent
Change the profile description stored in the MSagent_profiles table (executed at the Distributor on any database)
exec sp_change_agent_profile @profile_id = one, @property = ' description ', @value = ' agent configuration file for the replicated queued transaction reader. '
Increase the parameters of the agent configuration file (executed at the Distributor on any database)
exec sp_add_agent_parameter @profile_id = 11--configuration file id, @parameter_name = ' resolverstate '--parameter name, @parameter_value = 2--parameter values (conflicts are based on subscriber)
Change the parameters of the agent configuration file (executed at the Distributor on any database)
exec sp_change_agent_parameter @profile_id = 11--configuration file id, @parameter_name = ' resolverstate '--parameter name, @parameter_ Value = 2--parameter values (conflicts are subject to subscriber)
Publication property settings: Conflicting policy for subscription to publication
-- in the post conflict, the subscription is the same (publish database execution) EXEC sp_changepublication @publication = n ' publicationname ', @property = N ' conflict_ Policy ', @value = N ' Sub Wins '
More parameter reference: Replication Agent Sp_changepublication
SQL Server changes replication agent profile parameters and two conflicting policy settings