使用 SQL Server 进行差异更新
我有几个 Firebird 格式的巨大数据库(每个 2GB)。每隔几周,这些数据就必须与 MS SQL Server 同步。目前,这是一个冗长的过程,仅截断目标表,然后使用 Database Workbench(多 DB DBMS)复制每一行。是否有任何聪明的方法来进行部分或差异更新,以加快进程或减少服务器之间的数据传输?
I have several huge (2GB each) database in Firebird format. Every few weeks, this data has to be synchronized with an MS SQL Server. Currently this is a long winded process which just truncates the destination tables then copies each row with Database Workbench (a multi DB DBMS). Is there any clever way to do a partial or differential update which would speed up the process or involve less pumping of data between servers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不尝试对每条记录进行哈希(MD5 或类似的)?如果您还动态存储/计算加载数据的 MD5 哈希值,那么您可以使用表的主键和 MD5 哈希值快速确定是否有任何更改,或者记录是否不存在。
当然,这需要逐个表地完成。
我们使用了类似的方法,使用 SQL OLTP 数据作为 DWH 的源,效果非常好!
Why dont you try making a hash (MD5 or similar) of each record? If you also store/calculate on the fly an MD5 hash of your loaded data then you can quickly determine using primary keys of a table and the MD5 hash if anything has changed, or indeed if a record doesnt exist.
This of course would need to be done on a table by table basis.
We have used a similar method using SQL OLTP data as a source into a DWH, works very nicely!