Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql to oracle

I've googled this but can't get a straight answer. I have a mysql database that I want to import in to oracle. Can I just use the mysql dump?

like image 947
Mike Rifgin Avatar asked Jan 28 '26 17:01

Mike Rifgin


2 Answers

Nope. You need to use some ETL (Export, Transform, Load) tool.
Oracle SQL Developer has inbuilt feature for migrating MySQL DB to Oracle.
Try this link - http://forums.oracle.com/forums/thread.jspa?threadID=875987&tstart=0 This is for migrating MySQL to Oracle.

like image 84
Padmarag Avatar answered Jan 31 '26 07:01

Padmarag


If the dump is a SQL script, you will need to do a lot of copy & replace to make that script work on Oracle.

Things that come to my mind

  • remove the dreaded backticks
  • remove all ENGINE=.... options
  • remove all DEFAULT CHARSET=xxx options
  • remove all UNSIGNED options
  • convert all DATETIME types to DATE
  • replace BOOLEAN columns with e.g. integer or a CHAR(1) (Oracle does not support boolean)
  • convert all int(x), smallint, tinyint data types to simply integer
  • convert all mediumtext, longtext data types to CLOB
  • convert all VARCHAR columns that are defined with more than 4000 bytes to CLOB
  • remove all SET ... commands
  • remove all USE commands
  • remove all ON UPDATE options for columns
  • rewrite all triggers
  • rewrite all procedures

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!