Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have MySQL database backup file (Mysql version 5.1) and i want to restore it in Sqlserver 2008 how do i restore it?

share|improve this question

migrated from Jun 6 '10 at 19:19

This question came from our site for professional and enthusiast programmers.

That's not a restore, it's a migration. – John Gardeniers Jun 7 '10 at 0:28

You can't restore a MySQL backup into SQLServer 2008 automatically. You can write a conversion script to convert the data, or use a tool like Microsoft DTS (called SQL Server Integration Services nowadays).

share|improve this answer

If you still have access to the database in MySQL, you should be able to get the data out of MySQL into a format usable my MS SQL by using the mysqldump command and the --compatible=mssql command line switch. Although, you do sometimes end up having to edit the dump file manually if it gives you errors importing it into SQL Server.

If you only have access to the backup file, the same tactic may work if you import it into a new instance of MySQL and then dump it to a new backup file.

share|improve this answer

Use a SQL script generator on your MYSQL database and run the script file on your MSSQL database. As long as you don't have overlapping different types you should be good.

To create a database create script:

  1. Open the MySQL Query Browser window
  2. Open a new Script tab (Ctrl + Shift + T)
  3. Drag the required tables onto the script tab
  4. You should see the generated CREATE TABLE script

Then you need export the data to CSV so your can import it.

Additionally Redgate has an early release of SQL Compare for MYSQL you could play with to see if it can help generate the scripts between the two types ( i have no idea, as i havent tried it yet ):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.