Rachel
Rachel

Reputation: 103397

Tools for Migrating from Oracle to MySQL

I want to migrate schema from Oracle to MySQl, so are there any free tools that would be useful for this task?

I have "Create table" statements in Oracle SQL Script, but it contains unique constraints and a foreign key. MySQL has MyISAM storage engine, and so foreign key is not supported.

How to solve this issue?

Sample Oracle create statements:

   CREATE TABLE channels 
(
  obt_id            NUMBER(19) PRIMARY KEY,
  discriminator     VARCHAR2(64) NOT NULL
                    CONSTRAINT check_channel_discriminator CHECK (discriminator IN ('CHANNEL','SALES_CHANNEL')),
  chan_id           VARCHAR2(255),
  description       VARCHAR2(255),
  name              VARCHAR2(255) NOT NULL,
  obt_version       VARCHAR2(255),
  fk2_channel       NUMBER(19)
                    CONSTRAINT fk_channel_channel REFERENCES channels(obt_id)
);

CREATE TABLE object_types 
(
  obt_id                    NUMBER(19) PRIMARY KEY,
  enum_value                VARCHAR2(64) NOT NULL,
  external_name             VARCHAR2(64) NOT NULL,
  description               VARCHAR2(255),
  business_validation       NUMBER(1) DEFAULT 0,
  start_date_time           DATE DEFAULT to_date('01011900','DDMMYYYY'),
  end_date_time             DATE DEFAULT to_date('01014712','DDMMYYYY'),
  mut_date_time             DATE DEFAULT SYSDATE,
  mut_user                  VARCHAR2(32) DEFAULT USER,
  CONSTRAINT                object_types UNIQUE (external_name,start_date_time,end_date_time)
);

Upvotes: 2

Views: 9810

Answers (2)

txyoji
txyoji

Reputation: 6848

The mysql gui tool kit includes a migration tool. http://dev.mysql.com/downloads/gui-tools/5.0.html

You'll need to have the jdbc driver for Oracle installed on the machine where your running the tool kit.

Upvotes: 1

northpole
northpole

Reputation: 10346

I have not heard of a single tool that can assist in what you are asking for. This does not mean one does not exist, however, it is probably easier and less error prone to take your existing Oracle scripts and manually create the appropriate MySQL scripts. On every project I have been on the DBAs were responsible for data migration of this type and they always did it manually.

Edit:

That being said I did a quick google search and there are a few programs that claim to do this (at a cost). For example:

Oracle to MySQL

Data loader

DBConvert

I would obviously caution against using a third party tool and make sure you back up everything before starting.

Upvotes: 2

Related Questions