Skip to content
ctigeek edited this page Sep 28, 2014 · 1 revision

Welcome to the DbSync wiki!

USE THIS PRODUCT AT YOUR OWN RISK!!!! THIS PRODUCT HAS THE CAPABILITY OF DELETING LARGE AMOUNTS OF DATA. TEST IT IN A SANDBOX DEV ENVIRONMENT FIRST!!!


FAQ:

What is the point/goal of this product?

To simulate replication from a MySql database to a Sql Server database.

Why would I want this?

Lots of reasons. I wrote it because we were migrating a few MySql schemas to Sql Server. These databases are used by several applications, so it was necessary to make sure any changes in MySql were reflected in SQL server in near real-time. This would allow applications to move to SQL Server one at a time, avoiding a "big bang" change which would require the coordination of multiple groups. It also allowed us to do the change without any downtime of the product.

How does it work?

For each table in the source DB that you want to sync, create three triggers (for insert,update,delete) to write a row into the new sync_change table. This product will determine which rows have changed by reading from the sync_change table, read the rows from the source DB, and update/insert/delete the rows in the destination DB.

Pre-requisites:

  • Source DB must be MySql. I've used it with MySql 5.5.
  • Source DB creds must allow reads for your data schema, and read, update,writes for the sync_change table.
  • Destination DB SQL Server. I've used it with 2008 and 2012.
  • Destination DB creds must allow update/insert/delete for any table you want to sync.