Specify Interactive Conflict Resolution for Merge Articles
This topic describes how to specify interactive conflict resolution for merge articles in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL.
Microsoft SQL Server replication provides an Interactive Resolver, which allows you to resolve conflicts manually during on-demand synchronization in Microsoft Windows Synchronization Manager. After interactive resolution is enabled, resolve conflicts interactively during synchronization, using the Interactive Resolver. The Interactive Resolver is available through the Microsoft Windows Synchronization Manager. For more information, see Synchronize a Subscription Using Windows Synchronization Manager (Windows Synchronization Manager).
In This Topic
Before you begin:
Recommendations
To specify interactive conflict resolution for merge articles, using:
SQL Server Management Studio
Transact-SQL
Before You Begin
Recommendations
- If a synchronization is performed outside of Windows Synchronization Manager (as a scheduled synchronization or an on demand synchronization in SQL Server Management Studio or Replication Monitor), conflicts are resolved automatically without user intervention, using the default conflict resolution specified for the article. For more information, see Interactive Conflict Resolution.
[Top]
Using SQL Server Management Studio
To enable interactive conflict resolution for an article
On the Articles page of the New Publication Wizard or the Publication Properties - <Publication> dialog box, select a table. For more information about using the wizard and accessing the dialog box, see Create a Publication and View and Modify Publication Properties.
Click Article Properties, and then click Set Properties of Highlighted Table Article or Set Properties of All Table Articles.
On the Article Properties - <Article> or Article Properties - <ArticleType> page, click the Resolver tab.
Select Allow Subscriber to resolve conflicts interactively during on-demand synchronization.
Click OK.
If you are in the Publication Properties - <Publication> dialog box, click OK to save and close the dialog box.
To specify that a subscription should use interactive conflict resolution
In the Subscription Properties - <Subscriber>: <SubscriptionDatabase> dialog box, specify a value of True for the Resolve conflicts interactively option. For more information about accessing this dialog box, see View and Modify Push Subscription Properties and View and Modify Pull Subscription Properties.
Click OK.
[Top]
Using Transact-SQL
You can programmatically specify that a Subscriber will use this graphical interface to resolve article conflicts when a pull subscription to a merge publication is created. Only conflicts in articles that support this option will be displayed in the Interactive Resolver.
To create a merge pull subscription that uses the Interactive Resolver
At the Publisher on the publication database, execute sp_helpmergearticle, specifying @publication. Note the value of allow_interactive_resolver for each article in the result set for which the Interactive Resolver will be used.
If this value is 1, the Interactive Resolver will be used.
If this value is 0, you must first enable the Interactive Resolver for each article. To do this, execute sp_changemergearticle, specifying @publication, @article, a value of allow_interactive_resolver for @property, and a value of true for @value.
At the Subscriber on the subscription database, execute sp_addmergepullsubscription. For more information, see Create a Pull Subscription.
At the Subscriber on the subscription database, execute sp_addmergepullsubscription_agent, specifying the following parameters:
@publisher, @publisher_db (the published database), and @publication.
A value of true for @enabled_for_syncmgr.
A value of true for @use_interactive_resolver.
The security account information required by the Merge Agent. For more information, see Create a Pull Subscription.
At the Publisher on the publication database, execute sp_addmergesubscription.
To define an article that supports the Interactive Resolver
- At the Publisher on the publication database, execute sp_addmergearticle. Specify the name of the publication to which the article belongs for @publication, a name for the article for @article, the database object being published for @source_object, and a value of true for @allow_interactive_resolver. For more information, see Define an Article.
[Top]
See Also
Tasks
View and Resolve Data Conflicts for Merge Publications (SQL Server Management Studio)