使用 SQL Server 进行差异更新

发布于 2024-11-16 03:57:07 字数 169 浏览 7 评论 0原文

我有几个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

您的好友蓝忘机已上羡 2024-11-23 03:57:07

为什么不尝试对每条记录进行哈希(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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文