Solved

Records in the Conflict tables even though Custom Resolver is working

Posted on 2006-10-24
5
704 Views
Last Modified: 2009-07-29
Hello,

I have merge replication setup between two SQL2000 (SP3a) DBs.

The Subscriber synchronises with the Publisher every 15mins and has been like this for 2 years.

Updates are allowed on both DBs

I am using the Microsoft SQL Server DATETIME (Later Wins) Conflict Resolver to resolve any conflicts where the same record is updated on both DBs.

The "resolve conflicts interactively" option is not enabled.

The resolver is working fine and the record with the latest date always wins.

However I have recently noticed that in EM I can View Conflicts and choose to "Keep winning change" or "Resolve With This Data" on conflicts that have already been resolved.

My question is, although the resolver is working correctly why are records appearing in the Conflict tables?

Should I be concerned by the records in the conflict table or will they be automatically removed after a certain time?



Thanks in advance,


Paul
0
Comment
Question by:paulmward
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Gokulm
ID: 17794554
Conflict viewer displays the results of conflicts that are already resolved. So you need not worry about the records in the conflict table.. below is the extract from BOL...

Interactive Resolver
Microsoft SQL Server replication provides an interactive resolver, which allows you to resolve conflicts manually during on-demand synchronization. Activated at run-time, the Interactive Resolver displays data for each conflicting row, and provides options for viewing and editing the conflict data, and resolving each conflict individually.

Interactive Resolver and the Conflict Viewer
The Interactive Resolver resembles the Conflict Viewer. However, the Conflict Viewer displays the results of conflicts that are already resolved after merge synchronization, and the Interactive Resolver displays each conflict prior to resolution, allowing you to determine the outcome of each conflict during merge synchronization. Someone must be available to monitor the Interactive Resolver when a conflict occurs.
0
 

Author Comment

by:paulmward
ID: 17794635
Thanks Gokulm.

Are the records in the conflict tables maintained/deleted at anytime or will they continue to build up until they are manually deleted?
0
 
LVL 6

Accepted Solution

by:
Gokulm earned 100 total points
ID: 17794791
I guess these need to be manually deleted. You can use the below system stored proc to do so...

sp_deletemergeconflictrow
Deletes rows from a conflict table or the MSmerge_delete_conflicts table. This stored procedure is executed at the computer where the conflict table is stored, in any database.

Syntax
sp_deletemergeconflictrow [ [ @conflict_table = ] 'conflict_table' ]
    [ , [ @source_object = ] 'source_object' ]
    { , [ @rowguid = ] 'rowguid'
    , [ @origin_datasource = ] 'origin_datasource' ] }
    [ , [ @drop_table_if_empty = ] 'drop_table_if_empty' ]

0
 

Author Comment

by:paulmward
ID: 17794917
Thanks for pointing out the sp

I've had a look into it and it looks like it's what I'm after.

What I'm still unsure about is what's the point logging the records in the conflict tables when they've already been resolved.

If it's a case of "that's the way it works" then fine, but I'm just wondering whether there's anything I can do to stop the records from being entered into the conflict tables and therefore having to be maintained?
0
 
LVL 6

Expert Comment

by:Gokulm
ID: 17794946
Conflicts are automatically resolved using the conflict resolver initially selected when the article was created. As conflicts are resolved during synchronization, the data from the losing row is written to a conflict table. The Replication Conflict Viewer allows you to review these conflict records and, potentially, modify your data.

The conflict resolver choices for queued updating subscriptions are:
Publisher wins and the subscription is reinitialized
Publisher wins
Subscriber wins

Note:  The Replication Conflict Viewer displays conflicts that may occur as part merge replication or as part of snapshot or transactional replication whenever updatable subscriptions (immediate updating or queued updating) are used. In the case of snapshot and transactional publication using updatable subscriptions, you will be able to use Replication Conflict Viewer to observe the conflict, but you will not be able to alter the resolution the way you can with conflicts that occur during merge replication synchronization.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now