简体   繁体   中英

Unable to Import a database from Microsoft SQL Server Management Studio to phpmyadmin

Hey folks, the person I am buildling a website for decided to design their own database. They used Microsoft SQL Server Management Studio to build it and such. Now that they are done with the database they exported it to a text file (Tasks -> Generate Scripts). Now when I try to import the file into phpmyadmin I get the following error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[master] GO /****** Object: Database [Butterbakers] Script Date: 02/15/201' at line 1

The database code is here: http://zamn.pastebin.com/Y3u7MpZ9

phpmyadmin is for MySQL.
Microsoft SQL Server is a different DBMS.
Large parts of the SQL Syntax is DBMS/vendor specific.

The MySQL Workbench has a feature to "Create EER Model from existing Database". This may be a try but you need a jdbc connection to the MS SQL Server and MySQL...

Converting DDL to a different DBMS is all but easy. And if you're done this doesn't guarantee that an probably already existing application is still working with the other DBMS.

Not switching DBMS and using the free MS SQL Express could be an option.

First decide for a DBMS and restart form zero is surely the cleanest and less painful solution.

使用SQL比较( http://www.red-gate.com/products/sql-development/sql-compare/ )和SQL数据比较( http://www.red-gate.com/products/sql-development/ sql-data-compare / ),则可以同步其他数据库。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM