Skip to content

Latest commit

 

History

History
91 lines (70 loc) · 4.77 KB

File metadata and controls

91 lines (70 loc) · 4.77 KB
title sp_configure_peerconflictdetection (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/04/2017
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
replication
ms.tgt_pltfrm
ms.topic language-reference
applies_to
SQL Server
f1_keywords
sp_configure_peerconflictdetection_TSQL
sp_configure_peerconflictdetection
helpviewer_keywords
sp_configure_peerconflictdetection
ms.assetid 45117cb2-3247-433f-ba3d-7fa19514b1c3
caps.latest.revision 17
author BYHAM
ms.author rickbyh
manager jhubbard

sp_configure_peerconflictdetection (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Configures conflict detection for a publication that is involved in a peer-to-peer transactional replication topology. For more information, see Conflict Detection in Peer-to-Peer Replication. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_configure_peerconflictdetection [ @publication = ] 'publication'  
    [ , [ @action = ] 'action']  
    [ , [ @originator_id = ] originator_id ]  
    [ , [ @conflict_retention = ] conflict_retention ]  
    [ , [ @continue_onconflict = ] 'continue_onconflict']  
    [ , [ @local = ] 'local']  
    [ , [ @timeout = ] timeout ]  
  

Arguments

[ @publication=] 'publication'
Is the name of the publication for which to configure conflict detection. publication is sysname, with no default.

[ @action= ] 'action'
Specifies whether to enable or disable conflict detection for a publication. action is nvarchar(5), 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)

[ @originator_id= ] originator_id
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 has never been used in the topology. For a list of IDs that have already been used, query the Mspeer_originatorid_history system table.

[ @conflict_retention= ] conflict_retention
[!INCLUDEssInternalOnly]

[ @continue_onconflict= ] 'continue_onconflict' ]
Determines whether the Distribution Agent continues to process changes after a conflict is detected. continue_onconflict is nvarchar(5) with a default value 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 has the highest originator ID. This method does not guarantee convergence. You should make sure that the topology is consistent after a conflict is detected. For more information, see "Handling Conflicts" in Conflict Detection in Peer-to-Peer Replication.

[ @local= ] 'local'
[!INCLUDEssInternalOnly]

[ @timeout= ] timeout
[!INCLUDEssInternalOnly]

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_configure_peerconflictdetection is used in peer-to-peer transactional replication. To use conflict detection, all nodes must be running [!INCLUDEssKatmai] or later versions; and detection must be enabled for all nodes.

Permissions

Requires membership in the sysadmin fixed server role or db_owner fixed database role.

See Also

Conflict Detection in Peer-to-Peer Replication
Peer-to-Peer Transactional Replication
Replication Stored Procedures (Transact-SQL)