How to: Specify Interactive Conflict Resolution for Merge Articles (Replication Transact-SQL Programming)
Microsoft SQL Server replication provides an Interactive Resolver, which allows you to resolve conflicts manually during on-demand synchronization in Microsoft Windows Synchronization Manager. 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. Interactive Resolution requires Windows Synchronization Manager. 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 Interaktive Konfliktlösung.
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 Vorgehensweise: Erstellen eines Pullabonnements (Replikationsprogrammierung mit Transact-SQL).
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 Vorgehensweise: Erstellen eines Pullabonnements (Replikationsprogrammierung mit Transact-SQL).
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 How to: Define an Article (Replication Transact-SQL Programming).