复制问题 - 冲突解决
(sqlserver 2008)
我们有多个订阅者和一个发布者。我们有一张记录库存的表。现在,发生的情况是这样的 - 用户对库存表的订阅者进行了一些更改(BalanceQty 列被修改),而另一个用户对 Publisher 中的同一表和列进行了更改。因此,当发生同步时,就会引发冲突。但是,出版商获胜,并且数据库中反映了错误的数量。我们应该如何应对这种情况?同步应考虑这两个值。
(sqlserver 2008)
We have various subscribers and one publishers. We have a table which keeps track of inventory. Now, this is what happens - a user makes some changes on the subscriber to the inventory table(column BalanceQty is modified), and another user makes changes on the same table and column in Publisher. So, when synchronization happens, a conflict is raised. But, the publisher wins and the wrong quantity is reflected in the database. How should we tackle this scenario? The synchronization should take both values in consideration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,对列值的最新更新将获胜。根据您的业务规则,您可以使用 SQL Server 中提供的冲突解决程序之一(例如“订阅者始终获胜”解决程序)。
所提供的解析器如下所述: http://msdn.microsoft.com/en-我们/library/ms152573.aspx
By default, the most recent update to the column value will win. Depending on your business rules, you could use one of the provided conflict resolvers in SQL Server (such as the "Subscriber Always Wins" resolver).
The provided resolvers are described here: http://msdn.microsoft.com/en-us/library/ms152573.aspx