LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2008, 11:36 PM   #1
bipinkdas
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat,Trustix,Fedora
Posts: 52

Rep: Reputation: 15
Thumbs up MySQL to Oracle Conversion Tool ??


Hello Friends

One of my client needs to convert his MySQL database to Oracle. He has given me the Backup of mysql to me. Is there any tool/script available which used to do the same job ?

Thanks in Advance.
 
Old 08-13-2008, 07:41 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
In principle dump sql and import sql. However, different vendors have different features that end up with different sql. I haven't dealt with the Oracle end, but where I work we have dealt with interchange between msql, mysql and postgresql. It's generally a pain in the butt, and I figure going to Oracle may be more so. You need someone who knows the database and the source and target engines. Then you do an import, see what works and what doesn't, make changes in the sql dump file, and try again. If it basically gets in, but some things are not quite right, then you end up twiddling things directly in the target database. If the person who developed the database used features specific to the source engine that aren't present or are very different in the target engine, then it becomes more difficult. We're trying to standardize on MySQL, but one of the databases that was developed in PostgreSQL is so specific that we are still running it there.

Sorry if that's not too helpful. If I had to do it, I might beat on Google for a while to see if there are any helpful tools. That's basically what you are doing by asking here. If you do find them, there will be cases they won't handle and will flag as requiring attention.
 
Old 08-13-2008, 04:24 PM   #3
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
http://www.oracle.com/technology/tec...ldev_omwb.html

You could, of course, do it by hand. There are some howtos for that, just google it.
 
Old 08-13-2008, 06:30 PM   #4
PAix
Member
 
Registered: Jul 2007
Location: United Kingdom, W Mids
Distribution: SUSE 11.0 as of Nov 2008
Posts: 195

Rep: Reputation: 40
I think you might be on a hiding to nothing - through no fault of your own. Here is my thinking on the matter, but first a short story.

1.
A financial system was being re-written from ICL Cobol system that was about ten years old and well past it's sell by date. When the designers asked the users what reports they wanted, they said that they wanted the reports just like they had already. Hmmm. Asked to describe what they actually had already, bearing in mind that the Cobol system developers and most of the maintainers were long down the road, it became clear very quickly that they didn't know what they had or what they wanted. We entered a process of duplicating what they had and occasionally came upon groups of figures that couldn't be rationalized. It appears that these groups had been in error from day one 10 years ago and instead of getting corrected, they were just ignored. They were eventually left out of the new reports as no one knew what they should be representing anyway.

2.
Most database migrations tend not to just get translated from one system to the other, because that way lies mass mediocrity. As Choogendyk mentioned, to be able to succeed you will need to be familiar with both DBMS and the application, even though you weren't in on the original design. I would suggest that this is the opportunity to drop that inevitable functionality that never got used and pick up on things that weren't there originally. The Oracle database needs to be designed with the MySQL database with all it's relationships in mind and then the tables need dumped, possibly loaded to spreadsheets and reloaded into the target system. Use of triggers and non vanilla ansi standard stuff will doubtless be a real pain, in the butt and elsewhere. Good luck. If the system is of significant size, I would further suggest that one person works on the one system dumping and preparing the data, and the other person looks after loading it into the new DBMS. Working together you should manage to stay sane. Good luck.
 
Old 08-13-2008, 06:36 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If the cols on corresponding tables are defined in the same order, you could try a mysqldump, using the data-only options eg --no-create-db, --no-create-info etc etc. see this page: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
Basically create a customised dump that you can then use SQL-LOADER to load.

You'll want to turn off indexes before the load to speed it up

Alternately, if you need to fiddle the MySQL values to fit the ORACLE tables, and/or change the formats/col orders, write a Perl prog using DBI to create the correct dump.
In fact, if both DBS are avail, you can use the Perl prog to connect to both DBS and just txfr data cross, amending values etc on the fly.
http://search.cpan.org/~timb/DBI-1.607/DBI.pm


Fundamentally, data txfr between any set of DBs, even the same tech, is fraught as per choogendyk's warnings. I've done it myself several times...
 
  


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
Video file conversion tool Lunix Linux - Software 3 07-05-2007 03:41 AM
NetBeans Tool for conversion Lhlalyam Linux - Desktop 1 06-24-2007 07:00 PM
Looking for a RTF to PDF conversion tool buggabill Linux - Software 3 05-09-2007 09:06 PM
tool for conversion between graphic formats? heleen Linux - Software 3 02-25-2006 04:12 AM
looking for fast pdf conversion tool James_dean Linux - Software 1 10-13-2005 07:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:42 PM.

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