简体   繁体   English

跟踪更改并从 Mysql -> MSSQL 进行更改的最佳方法

[英]Best way to track changes and make changes from Mysql -> MSSQL

So I need to track changes that happen on a Mysql table.所以我需要跟踪发生在 Mysql 表上的更改。 I was thinking of using triggers to log all the changes made to it and then save these changes in another table.我正在考虑使用触发器来记录对其所做的所有更改,然后将这些更改保存在另一个表中。 Then I will have a cron script get all these changes and propagate the changes into the Mssql database.然后我将有一个 cron 脚本获取所有这些更改并将这些更改传播到 Mssql 数据库中。

I really dont expect a lot of information to be proporgated, but the data is very time sensitive.我真的不希望传播很多信息,但是数据对时间非常敏感。 Ideally the MSSQL will see these changes within a minute, but I know that this requirement may be too high.理想情况下,MSSQL 会在一分钟内看到这些变化,但我知道这个要求可能太高了。

I was wondering if anyone had a better solution.我想知道是否有人有更好的解决方案。

I have the bulk of the site written in .net but use vbulletin as the forums (sorry but there are no .net forums as powerful or feature rich like vbulletin)我的大部分网站都是用 .net 编写的,但使用 vbulletin 作为论坛(抱歉,没有像 vbulletin 那样强大或功能丰富的 .net 论坛)

The majority of the replicator tools use this technique.大多数复制器工具都使用这种技术。 Fill another table on insert/update/delete triggers that containt the tablename and the PK or a unique key.在包含表名和 PK 或唯一键的插入/更新/删除触发器上填充另一个表。

Then a reader reads this table, do the proper "select" if insert/update to get the data, then updates the other database.然后读取器读取此表,如果插入/更新以获取数据,则执行正确的“选择”,然后更新其他数据库。

HTH HTH

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

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