When I use the phpMyAdmin export, it has an option for MS SQL export compatibility. However, the resulting file includes many non-MS SQL compatible items, such as mediumtext and enum datatypes. How do I work around this issue?
A:
If you are unable to locate a way for phpMyAdmin to generate an exported file of the correct format, then you'll have to edit the resulting exported file to make it compatible with MS SQL. You may need to use regular expressions to, for example, replace ENUM datatypes.
If you find that you have to export data frequently, you may find that writing a short text processing script that you can re-run as needed will save you time.
Oh, and take care that your text editor or favorite scripting language can properly handle the character encoding of the file generated by phpMyAdmin.
jkndrkn
2009-11-10 21:41:32
+1
A:
mysqldump --compatible=mssql -uroot -p some_database > output_file_mssql.sql
vs
mysqldump -uroot -p some_database > output_file.sql
Looking at the difference between the two files will show you some things to check out.
I hope that helps some.
genio
2009-11-10 21:48:25