简体   繁体   中英

Replication from MySQL to MS SQL

I'm facing a new challenge here. I can't seem to find precedence for replication from MySQL, running on a Linux box to MS SQL Server.

Has anybody done this before?

Most importantly all changes made to the MySQL database should be replicated on the MS database realtime or close. MS database are not likely to be updated in any other way, so a bidirectional facility is not required.


I thought one way is to read the changes out of the binary log. Has anyone parsed one before?

Thanks for your help guys.

Triggers in MySQL could be used to catch changes and call a UDF, which could then execute ODBC queries to MSSQL. Likely terrible for performance, though.

If immediate replication isn't required:

  • Write triggers in MySQL that capture insert, update, and delete statements in a log table.
  • Poll the log table from MSSQL using ODBC and execute them, then delete those log entries.

Of course, T-SQL and MySQL's variant of SQL isn't exactly the same, but it should be close for trivial CUD operations.

检查DBSync是否可以帮助您完成所需的工作

I had similar task, but I had to replicate from MSSQL 2008 to Mysql in real time.

I tried this application http://enterprise.replicator.daffodilsw.com/ and it worked but it didn't look reliable. But you can check I may be wrong.

Finally I decided to use interface OLE DB and postgress instead instead of Mysql. It works properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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