How will restore database from mysql to SQL Server 2008

  • Hi all,

    I have mysql backup file with SQL extension. Now i want to restore this file in SQL Server 2008. How will i do this? I tried but SQL server is supporting only .bak and .trn files.

    Can any body help me ?

    Thanks

    Shailesh

  • I am just guessing, but I believe that MySQL and SQL Server backups are completely different formats so you can't restore one to the other. I could be wrong.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Jack's right. Those are two different applications in two different formats. You can't restore one from the other. In fact, you should do a search for MySQL conversion utilities, because that's what you need.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • You can use the MySQLDump utility with the compatilbility set to SQL Server. That will create a file with necessary DDL and insert statements that can be executed in SQL Server. Note however that it will use MySQL syntax and data types so it will need to be edited.

    Another approach is to use SSIS to copy and load data. However, this may not capture all stored procedures and views.

    DAB

  • See if you can open the file in a text editor. I've seen MySQL 'backups' in the past been nothing more than scripts to create and populate the DB. They won't run in SQL Server without modification though. There are differences in SQL syntax.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply