locked
How convert HeidiSql to T-SQL RRS feed

  • Question

  • I have been tasked with taking over a new website which had a database written in MySql (I think anyway).  The new website is an Azure website and the new database is Azure Sql database.  I was given a script file which defines the tables and the data to be inserted into them.

    Here is what is at the top of the file…

    -- --------------------------------------------------------

    -- Host:                         labyrinth

    -- Server version:               4.1.22-log - Source distribution

    -- Server OS:                    redhat-linux-gnu

    -- HeidiSQL Version:             8.3.0.4815

    -- --------------------------------------------------------

     

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

    /*!40101 SET NAMES utf8 */;

    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;

    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

    Below these lines is script that creates tables and inserts data into them (which is what I would expect).  My question is how do I import this into a Sql Server database? 

    Other questions what tools do I use?  Is HeidiSql the right tool for the job (I have downloaded/installed the Heidi executable to my Windows 8 Desktop).   I have also installed MS Sql Server Migration Assistance for MySQL, but have never used either tool.  Otherwise, I do have lots of experience with Microsoft Sql Server but no experience in MySql.

    What I think I need to do is have some sort of virtual machine that understands MySql and from their, I need to create the database.  Then I would use the Migration Assistance to import the database into Sql Server.


    John Marsing http://MyHebrewBible.com/

    Thursday, October 23, 2014 7:29 PM

Answers

  • I have been tasked with taking over a new website which had a database written in MySql (I think anyway).  ....  My question is how do I import this into a Sql Server database? 

    Hello John,

    If you can get access to the MySQL database, then you can use the free Microsoft tool SQL Server Migration Assistant for MySQL (MySQLToSQL) to migrate the database to MS SQL Server.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    • Proposed as answer by Visakh16MVP Friday, October 24, 2014 7:31 AM
    • Edited by Olaf HelperMVP Friday, October 24, 2014 7:42 AM
    • Marked as answer by John Marsing Friday, October 24, 2014 7:57 PM
    Friday, October 24, 2014 7:04 AM

All replies

  • I have been tasked with taking over a new website which had a database written in MySql (I think anyway).  ....  My question is how do I import this into a Sql Server database? 

    Hello John,

    If you can get access to the MySQL database, then you can use the free Microsoft tool SQL Server Migration Assistant for MySQL (MySQLToSQL) to migrate the database to MS SQL Server.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    • Proposed as answer by Visakh16MVP Friday, October 24, 2014 7:31 AM
    • Edited by Olaf HelperMVP Friday, October 24, 2014 7:42 AM
    • Marked as answer by John Marsing Friday, October 24, 2014 7:57 PM
    Friday, October 24, 2014 7:04 AM
  • I don't have access to the db.

    I went ahead and made the Heidi.sql into T-SQL, as I didn't find much in the way of a tool to convert the different dialects of SQL.  I turned out it wasn't that bad as I only needed a few tables anyway.

    Thanks,


    John Marsing http://MyHebrewBible.com/

    Friday, October 24, 2014 7:57 PM