July 17, 2008

MySQL to MSSQL Server Replication?

Posted in Software tagged , , , , at 1:51 pm by mj

The team I’m working with is in the process of moving from SQL Server to MySQL.

To ease the burden, we need all writes to the new MySQL databases to be replicated back into SQL Server, so that all of our back-end reports and what-not will continue to function. It’s short term, but not shorter than six months.

I can’t find any generic tool online to do this.

I thought about setting up a bridge MySQL instance with triggers that create a message queue, then reuse our existing Java DAOs to do the heavy lifting (they know how to read/write either SQL Server or MySQL). But, that quickly gets invasive and brittle.

My next thought was a lightweight wrapper around the mysqlbinlog program which does essentially what the MySQL replication threads do: reads a portion of the binlogs, persists its current position, then replays the statements.

Then I thought, “well, if we’re doing that, why not just reuse MySQL’s replication code and build something around that core?”

You can see the hole I’m getting myself into.

Are there better strategies? Are there (free or commercial) tools that can replay replication logs on a MSSQL Server instance?

The lightweight Perl/Python wrapper seems the best solution. Anybody have experience with something like this (for SQL Server or otherwise)?

Advertisements

4 Comments »

  1. Dev said,

    Hi,

    I am also looking to somehow replicate data from MySql to MS Sql Server. Can you please tell me more about the lightweight Perl/Python wrapper.

    Thanks in Advance

  2. Gary Edwards said,

    We are looking to implement something similar also.
    I am not having a lot of luck finding something to use.
    Have five servers running seven databases on mysql and need to
    replicate some of it (not 100% of tables).
    Asking for information or where to look for additional resources to deal with problem.
    Do not want to reinvent the wheel if it exists.
    TIA
    -gle

  3. HobbesPDX said,

    I take it from the silence here, that nothing has been found to aid this need of MSSQL MySQL.

    bummer.

  4. Decio said,

    Try DbReplicator:
    http://dbreplicator.org


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: