Friday, October 05, 2012 8:25 PM
I have a scenario with a transactional replication with queued subscriber updates. The system is designed for constant communication, but it's expected that the subscriber might sometimes lose network connections, so the updates must be queued.
It's entirely possible that certain records could be updated at the publisher and subscriber during one of these offline periods. When the connection comes back online, I want any conflicts to be immediately resolved in favor of the publisher. That is, any conflicting records in the subscriber to be immediately overwritten by the records in the publisher in case of conflict. They can be logged, but I don't want them to be reported as conflicts and hanging. The application specs are that this must happen without user intervention.
In my testing I haven't been able to get this to happen. My publication has @conflict_policy = 'pub wins'; however, when I create a disconnect between databases, insert conflicting records into a single table, and then restore the connection, I see the conflict in the Conflict Viewer, but the records themselves stay mismatched.
How do I force the conflict resolution policy to happen automatically? Thanks.
Saturday, October 06, 2012 1:01 AMModerator
Conflicts will be logged but they will not be cleared from the conflict viewer or conflict tables by default.
Can you post your insert scripts here please?
When I have @allow_queued_tran = N'true' and @conflict_policy = N'pub wins' and insert conflicting records for a table and then sync after a disconnect, the publisher change persists. The conflict resolution policy happens automatically for me.
- Proposed As Answer by Brandon WilliamsMicrosoft Community Contributor, Moderator Monday, October 15, 2012 6:28 AM
- Marked As Answer by Shulei ChenModerator Monday, October 15, 2012 9:32 AM