简体   繁体   English

借助rowversion技术同步数据库表数据

[英]Database table data synchronization with the help of rowversion technique

My company has many branches like in UK, Italy Germany etc. without using sql server built-in replication I want to synchronization table data writing a store procedure and sql server jobs. 我的公司有很多分支机构,例如在英国,意大利,德国等。不使用sql server内置复制功能,我想同步表数据,编写存储过程和sql server作业。

I want when any new data will be added in UK db server then my sp will add or update that data in Germany database through link server. 我想在英国数据库服务器中添加任何新数据时,我的sp将通过链接服务器在德国数据库中添加或更新该数据。 When Germany edit that data then the same data will be updated in UK database. 当德国编辑该数据时,相同的数据将在UK数据库中更新。

Another problem is there that suppose same data is update in Germany and UK end at same time then which one will be treated mother in this case. 另一个问题是,假设相同的数据在德国和英国同时更新,那么在这种情况下将被视为母亲。 how to handle this situation professionally. 如何专业地处理这种情况。

Can we update rowversion field manually? 我们可以手动更新rowversion字段吗?

If possible give me a sample code against my situation as a result I can visualize it properly which may help me to compose the whole thing. 如果可能的话,请根据我的情况给我一个示例代码,这样我就可以正确地可视化它,这可能有助于我完成整个工作。

This is a very difficult problem. 这是一个非常困难的问题。

If you want to try and tackle it, I suggest you read up on the idea of eventual consistency. 如果您想尝试解决它,建议您阅读有关最终一致性的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM