Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003

    Unanswered: import .sql file into mssql

    I have backup.sql created by mysql. How can I let mssql server to import such file?

  2. #2
    Join Date
    Apr 2004
    Kansas City, MO
    Well, assuming it's a dumpfile created from mysql, you need to attach it to a mysql server and use ODBC to connect and import from it. If it's just a SQL file, which I seriously doubt, then you can just open it up and run it from Query Analyzer provided it only used ANSI sql, which again I seriously doubt if it's mysql.
    When life gives you a lemon, fire the DBA.

  3. #3
    Join Date
    Oct 2003
    Look inside the file. If it is an .sql file, it probably contains SQL statements ... in the MySQL variant of the language which may or may not be compatible with MS-SQL. (Also, it may contain statements like DROP TABLE that you might not want to execute, so I say again ... look first!)

    If the file contains SQL statements, the information is processed by executing the statements. A "mysql dump file" is most commonly in this foramt.

    It's also possible that the file contains only data, possibly in some format like comma-delimited-ASCII. Such information is handled in other ways, and the correct treatment will be indicated based on what you actually find in the file.
    ChimneySweep(R): fast, automatic
    table repair at a click of the

  4. #4
    Join Date
    Dec 2003
    Thanks a lot. I did it over ODBC connection to MySQL and it is fine. I didn't work with MSSQL for a long time so I forgot completely to ODBC,..
    But again thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts