LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Importing an MS sql dbase into Mysql - linux (https://www.linuxquestions.org/questions/debian-26/importing-an-ms-sql-dbase-into-mysql-linux-811409/)

linx win 06-01-2010 02:39 AM

Importing an MS sql dbase into Mysql - linux
 
I have an MS sql data base file which I need to import it into Mysql. Is this possible? If yes, how to do that?

I tried the following but failed:
Created a new dbase and called it dbase. Then:
PHP Code:

mysql -u root -p
password
:
mysql> use mydbase
mysql
SOURCE /path/to/my/MSsql/file.sql

I got the following:
PHP Code:

ERROR 1064 (42000): You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'IF @p_where_str IS NOT NULL
            SET @l_where^str = @l_where_str + 0 


centosboy 06-01-2010 06:49 AM

You may need to convert the data first....
http://kofler.info/english/mssql2mysql/

cola 06-02-2010 02:19 AM

Nice.
@OP,is the problem solved?

linx win 06-04-2010 02:15 PM

Unfortunately, I do not have required experience in windowz. Is there any Linux script to do the job in Linux environment?

EricTRA 06-04-2010 02:20 PM

Hello,

Maybe this site can give you some more ideas and tools.

Kind regards,

Eric

linx win 06-07-2010 03:09 AM

Thanks. I finally did it using a program called MSSQL to MySQL Exporter available in this page:

http://sourceforge.net/projects/mssqltomysql/files/

With this program, I was able to export the dbase files and import them in mysql using the above commands.

EricTRA 06-07-2010 03:53 AM

Hello,

Glad you got a solution and thanks for sharing it with us.

If you consider your problem/question solved then please mark it as such using the Thread Tools.

Kind regards,

Eric


All times are GMT -5. The time now is 11:04 AM.