How to Migrate MySQL Data from MySQL to Microsoft SQL 2008

There are lots of reasons you may want to migrate from MySQL to Microsoft SQL. I think most people want to migrate because of the tools available in Microsoft SQL for maintaining and optimizing the database when it grows. In MySQL, there is a tool called MySQL Administrator, which is the interface for my.ini, but it could get complex and they are not wizard driven like Microsoft SQL.  I pretty sure that there may be other tools for MySQL but they may require some searching and paying for it.

So, here is how I migrate data from MySQL to Microsoft SQL 2008. You can use ” SQL Server Business Intelligence Development Studio”, which is very powerful but it requires some type knowledge how that works. Back in Microsoft SQL 2000 we used import data using and ODBC driver and using a DTS package.

Here are the steps in migrating data from MySQL to MSSQL 2008 using the function of “Import Data” of SQL Server Management Studio. You can also print and use as reference [print_link].


1.  Download and Install Connector/NET from MySQL in your SQL Server, you will need this tool to connect from MSSQL to  MySQL. You can download from the following website: http://dev.mysql.com/downloads/connector/net/5.2.html

MySQL .Net Tools

MySQL .Net Tools

2. Take a backup of MySQL database, for security purposes, and make sure that no application or users are accessing MySQL database.

3. If you don’t have, create a empty table in Microsoft SQL 2008 with same amount of fields and same data types.

Image2:

Database Tables

Database Tables

4.  Open SQL Server Management Studio and right click in [database-name] –> Task –> Import Data.

Image3:

MSSQL Import

MSSQL Import

5.  Follow the following screenshots in the Import and Export Wizard.

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import

MSSQL Import