Compartilhar via


How to: Specify the Conflict Tracking and Resolution Level for Merge Articles (Replication Transact-SQL Programming)

When a subscription to a merge publication is synchronized, replication checks for conflicts caused by changes to the same data made at both the Publisher and the Subscriber. You can specify whether conflicts are detected at the row-level, where any change to the row is considered a conflict, or column-level, where only changes to the same row and column are considered a conflict. Conflict resolution for articles is performed at the row-level. For more information on conflict detection and resolution when logical records are used, see Detecting and Resolving Conflicts in Logical Records. You can specify programmatically how conflicts are tracked when creating articles and after an article has been defined.

To specify conflict tracking options for a new merge article

  1. At the Publisher on the publication database, execute sp_addmergearticle and specify one of the following values for @column_tracking:

    • true - Use column-level tracking for the article.
    • false - Use row-level tracking, which is the default.

To change conflict tracking options for a merge article

  1. To determine the conflict tracking options for a merge article, execute sp_helpmergearticle. Note the value of the column_tracking option in the result set for the article. A value of 1 means that column-level tracking is being used, and a value of 0 means that row-level tracking is being used.

  2. At the Publisher on the publication database, execute sp_changemergearticle. Specify a value of column_tracking for @property and one of the following values for @value:

    • true - Use column-level tracking for the article.
    • false - Use row-level tracking, which is the default.

    Specify a value of 1 for both @force_invalidate_snapshot and @force_reinit_subscription.

See Also

Tasks

How to: Define a Logical Record Relationship Between Merge Table Articles (Replication Transact-SQL Programming)

Other Resources

Advanced Merge Replication Conflict Detection and Resolution
Detecting and Resolving Conflicts in Logical Records

Help and Information

Getting SQL Server 2005 Assistance