SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2001
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MS SQL to MYSQL will it work?

    Well, I have a db created in MS SQL 7. The DBA will not allow me to run it live due to licensing story and what have you.
    How can I convert this DB to MYsql and will it work?
    The reason I ask is 'cos the tables have FOREIGN KEYS and I understand Mysql doesn't support it.
    Thanks

  2. #2
    PHP warrior dkode's Avatar
    Join Date
    Sep 2001
    Location
    Planet Namek
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    foreign keys are nothing more than ID's in a table that link to a record in another table I beleive. The MS terminology might be different, but that is what a foreign key is in MySQL.

    As far as porting MS SQL db to MySQL, this shouldnt be a problem. As far as the queries and what have you, there are certain things that cannot be duplicated in MySQL, such as nested queries. do you wish to port only the data, or the data and the queries?
    "Mankind cannot define memory, yet it defines mankind"
    -- Project 2501, Ghost in the Shell

    Smarty | PEAR | PHP Manual | MySQL Manual

  3. #3
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could try Sybase ASE 11.0.0.3 for Linux. It's free and offers much of the T-SQL code that you have already written for 7.

    Remember MySQL doesn't support triggers, stored procedures, or sub-selects. Foreign keys and transactions are not supported in the vanilla version, although InnoDB tables do.

    MySQL does not have an integrated on-line backup server like MS SQL/Sybase do, so you will have to change your backup strategies. In MySQL, you can only dump to and read from plaintext files; so you'll have to tell MS SQL to dump (BCP probably) as a comma delimited (or something else) file and then tell MySQL to load it that way.


Bookmarks

Posting Permissions

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