I have scripts generated from a MySQL database using phpmyadmin to create database and insert data. The scripts were exported using compatible with MS SQL. Needless to say they are not compatible at all, transaction is open using

Start Transaction;

I tried compatibility level 100 (I'm using latest SQL Server Express), doesn't work.

I cannot install MySQL and cannot contact the software provider or database creator.

I am planning to use notepad++ to find and replace unless there is a better way. Questions are:

  1. is there a better way?
  2. What should I look for to find and replace (assuming someone has done that before)?
  • @TomV I am using SQL Server, script was generated using phpmyadmin form a MySQL database – user5495269 Feb 22 '16 at 19:03

Similar questions are asked regularly on this site. This usually boils down to end of line characters. Is your MySQL Unix/Linux or Windows? Use a hex editor to examine your scripts and see if you can find inconsistencies at line ends.

If this fails, you could take a dump using mysqldump and then use sed/awk/grep (or the editor of your choice - i.e. Notepad++) to put the file into a format suitable for SQL Server Express (dates tend to be the tricky ones here).

If you can access the MySQL database using phpMyAdmin, you should be able to use mysqldump.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.