Migrate MySQL To SQL Server

This page illustrates the strongness of the wellcode dbms tool and shows how to migrate a MySQL database to MS SQL Server including indexes and constraints. The Example uses the dbms tool to generate and create the schema and a part of WellFrame library to dynamically import data.

  1. Conditions to start
    • MySQL ODBC Driver or MySQL.Net are installed on your machine
    • An empty database on MS SQL Server is created and is ready for import.
  2. Start the migration
    • Download the migrate tool example from here
    • run the executable and enter the connection strings for
      • MySQL database and
      • the destination MS SQL Server databases.
    • Test the connections and start the migration

To download the example project including all dependencies click here. The Visual Studio project uses .Net Framework 4.5.

Please keep in mind, that the odbc driver has to be the same binary bit number as the programm it self. If you use 64bit driver, you must run the 46bit copy of import tool. To import from a 32bit mysql driver use the 32bit executables (see bin64 and bin32 directories in the example).

You can avoid using the ODBC Driver by changing the source code and replacing “OdbConnection” with the .Net Connection of MySQL Driver “MySqlConnection“.

DbmsConverterDialog

Here is the migrating source code for illustration:

  • Limitations
    This is just an example of how things can work. Not all the mysql data types are mapped to the data types of ms sql server.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.