How do I convert a Microsoft SQL Server database backup file such that to import in MySQL database? Is there any way or free tool available for this?
-
Can you be more specific? 'SQL Server' can mean Oracle versions, Microsoft versions, etc etc. – JClaspill Jul 07 '11 at 21:42
-
Do you specifically want to be able to take an MS SQL database backup and import into MySQL, or do you just want to be able to migrate an MS SQL Server database to MySQL? – Neville Kuyt Jul 08 '11 at 15:09
-
You are probably going to regret migrating from MSSQL to MySQL. Especially if you rely on the query plan optimizer at all (nested queries, many table joins, etc.). A better option, especially if you're running Windows Server, would be PostgreSQL. – gordy Jul 13 '11 at 04:44
-
Which Microsoft SQL Server Version is your backup in. I mean its sql server 2005 or sql server 2008 etc. – Devjosh Jul 13 '11 at 12:46
-
2http://stackoverflow.com/questions/156279/how-to-import-a-sql-server-bak-file-into-mysql – Devjosh Jul 13 '11 at 14:06
-
possible duplicate of [Data migration between different DBMS's](http://stackoverflow.com/questions/5217373/data-migration-between-different-dbmss) – CloudyMarble Dec 05 '13 at 10:10
4 Answers
Not sure about how complex a database you have, but if its just some tables and data, there is a free script here that will automagically convert Microsoft SQL Server tables and data over to MySQL.
If you need something more sophisticated, then MySQL has a migration toolkit which allows you to migrate from Microsoft SQL Server to MySQL. In addition here is a tutorial on how to use it. Note that this has now been discontinued, in favor of MySQL Workbench, which has data migration built in.
In addition, this converter will convert everything except stored procedures from MSSQL to MySQL, for a price of only $50 which isn't bad.
Also you may want to check out this whitepaper from MySql's website on how to plan a migration from SQL Server to MySQL, as well as some resources.

- 47,519
- 50
- 171
- 296
-
2+1 for the MySQL migration toolkit. I had to do this conversion on a project and it handled it all with only two problems: 1) I didn't try to convert the blobs that were being used to hold images and 2) pay attention to any warning that you receive when importing into MySQL. – Ray Baxter Jul 13 '11 at 07:31
-
-
ms2my (Pre-Alpha, free) http://sourceforge.net/projects/ms2my/
"A tool that helps with MSSQL to MySQL converting/replicating (both csv&dump) under *nix.Possible to use it with crontab for regular data fetching.Keeping mySQL-based data warehouse refreshed could also be one of the possibilities of using this script."
MSSQL to MySQL Converter (free trial download, for purchase $49) http://www.convert-in.com/mss2sql.htm
I've looked for quite awhile, and if you don't want to try ms2my, the above is about the only other option. And it isn't free.
Best of luck finding a free one, hopefully there is one that is hidden away out there on the internet that I can't find.

- 1,725
- 19
- 29
-
The above was found with Google search for 'mssql to mysql converter'. I have not used to above mentioned product – JClaspill Jul 07 '11 at 21:45
-
1The development status for that project is "Pre-Alpha"... Doesn't sound very reliable. – rid Jul 07 '11 at 23:50
Take a look at Omega Sync it supports export import and synchronisation between different DBMS's including Schema and table data.

- 36,908
- 70
- 97
- 130
If you are using a living MS SQL Server and a living MySQL server, then I think your best AND MORE ACCURACY option is to use an ETL/data transformation tool like Pentaho Data Integration (Kettle).
With Kettle you can visually design (using easy-to-learn data flow steps) almost any data transformation from single/multiple data source(s) to single/multiple data destination(s). One of the features you may be interested is the database/tables migration wizard.
If the community distribution of Kettle is not enough for you, then you can use the Enterprise Edition with more features, support, etc.

- 763
- 7
- 7