LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-01-2010, 02:39 AM   #1
linx win
Member
 
Registered: Jan 2004
Posts: 390

Rep: Reputation: 31
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 
 
Old 06-01-2010, 06:49 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
You may need to convert the data first....
http://kofler.info/english/mssql2mysql/
 
Old 06-02-2010, 02:19 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Nice.
@OP,is the problem solved?
 
Old 06-04-2010, 02:15 PM   #4
linx win
Member
 
Registered: Jan 2004
Posts: 390

Original Poster
Rep: Reputation: 31
Unfortunately, I do not have required experience in windowz. Is there any Linux script to do the job in Linux environment?
 
Old 06-04-2010, 02:20 PM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

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

Kind regards,

Eric
 
Old 06-07-2010, 03:09 AM   #6
linx win
Member
 
Registered: Jan 2004
Posts: 390

Original Poster
Rep: Reputation: 31
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.
 
Old 06-07-2010, 03:53 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing data in mysql? Frank Soranno Programming 3 08-20-2007 07:35 PM
backing up MySQL dbase DropHit Linux - Software 5 05-04-2004 03:19 PM
Mysql importing problem nepcw Linux - Newbie 4 03-22-2004 05:09 PM
mysql importing inq Robin01 Linux - Newbie 1 11-30-2003 09:12 AM
Importing FreeBSD mysql database to RedHat Linux 7.3 RKris Linux - Software 6 05-06-2003 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration