Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Configures conflict detection for a publication that is involved in a peer-to-peer transactional replication topology. For more information, see Peer-to-Peer - Conflict Detection in Peer-to-Peer Replication. This stored procedure is executed at the Publisher on the publication database.
Important
You can't use sp_configure_peerconflictdetection
to enable lastwriter
. To change the conflict resolution of an existing replication topology, drop the publication and recreate it.
Transact-SQL syntax conventions
sp_configure_peerconflictdetection
[ @publication = ] N'publication'
, [ @action = ] N'action'
[ , [ @originator_id = ] originator_id ]
[ , [ @conflict_retention = ] conflict_retention ]
[ , [ @continue_onconflict = ] N'continue_onconflict' ]
[ , [ @local = ] N'local' ]
[ , [ @timeout = ] timeout ]
[ ; ]
The name of the publication for which to configure conflict detection. @publication is sysname, with no default.
Specifies whether to enable or disable conflict detection for a publication. @action is nvarchar(32), and can be one of the following values.
Value | Description |
---|---|
enable |
Enables conflict detection for a publication. |
disable |
Disables conflict detection for a publication. |
NULL (default) |
Specifies an ID for a node in a peer-to-peer topology. @originator_id is int, with a default of NULL
. This ID is used for conflict detection if @action is set to enable
. Specify a positive, nonzero ID that hasn't been used in the topology. For a list of IDs that were already used, query the MSpeer_originatorid_history system table.
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
Determines whether the Distribution Agent continues to process changes after a conflict is detected. @continue_onconflict is nvarchar(5), with a default of false
.
Caution
We recommend that you use the default value of false
. When this option is set to true
, the Distribution Agent tries to converge data in the topology by applying the conflicting row from the node that's the highest originator ID. This method doesn't guarantee convergence. You should make sure that the topology is consistent after a conflict is detected. For more information, see Handling Conflicts.
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
0
(success) or 1
(failure).
sp_configure_peerconflictdetection
is used in peer-to-peer transactional replication. To use conflict detection, all nodes must be running SQL Server 2008 (10.0.x) or later versions; and detection must be enabled for all nodes.
Requires membership in the sysadmin fixed server role, or db_owner fixed database role.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today