1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Rep Power
    Hello all,
    How difficult would it be to take a MS-SQL database and turn it into a MySQL database. can anyone tell me the exact steps of how to do this, or point me to a site that does?

  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Central Florida, USA
    Rep Power
    It depends on just how complicated your database is, especially if it uses stored procedures, triggers, Foreign Keys and transactions.

    Stored procedures wouldn't be that hard to turn back into regular SQL, but MySQL has NO support for triggers and transactions right now, so you would have to come up with another programming method to deal with these.

    If your database is fairly simple, though, it's possible, but it would take a bit of work. You would use the MSSQL Enterprise manager to generate scripts for all objects in the database, and then edit the scripts to make them compliant with MySQL, and then run the scripts in MySQL. For example the Money datatype doesn't exist in MySQL, so you would have to change Money columns to be Decimal columns with two decimals, etc...

    THEN... after you have created your tables and keys in MySQL to be as close as possible to the ones in MSSQL, you would export your MSSQL data in a Comma-Delimited format and import it into MySQL.

    If you don't understand half the terms I've used here, you will have quite a learning curve, but if you have a fair SQL knowledge, you will be able to figure it out. You will have to take the time to read the MySQl documentation, though.

    It wouldn't surprise me if someone has written a procedure to do at least some of this automatically. (try looking at www.weberdev.com) Also, a great utility for MySQL is phpMyAdmin (at www.phpwizard.net), which provides MySQL with a web-based equivalent of the MSSQL Enterprise Manager.

    Please feel free to ask some more specific questions if you decide to proceed.

    Comments on this post

    • pabloj agrees

Similar Threads

  1. Replies: 0
    Last Post: December 30th, 2003, 12:57 PM
  2. Replies: 0
    Last Post: November 27th, 2003, 08:04 PM
  3. Errcode:13 . How to solve it on MySQL + Windows 2000
    By hankycheng in forum MySQL Help
    Replies: 28
    Last Post: August 3rd, 2003, 10:05 AM
  4. SQL query for a vBulletin MySQL dB
    By SpankMe in forum MySQL Help
    Replies: 3
    Last Post: October 31st, 2001, 05:11 PM

IMN logo majestic logo threadwatch logo seochat tools logo