sp_configure_peerconflictdetection (Transact-SQL)

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
    Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

  • [ @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.

    Warning

    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'
    Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 

  • [ @timeout= ] timeout
    Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. 

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 SQL Server 2008 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

Reference

Replication Stored Procedures (Transact-SQL)

Concepts

Conflict Detection in Peer-to-Peer Replication

Peer-to-Peer Transactional Replication