8

Currently, our application is running using Oracle 11g database. We are developing a newer version of the application which runs on the MySQL cluster. We need to migrate the data from the Oracle database to the MySQL database. This is not a direct copy of database objects. In newer version of the application schema(table structure and relationships) is changed. And audit tables also need to be copied. Is there any way to map tables, columns from old Oracle schema and new MySQL schema and apply copy so that the data will be copied?

We are thinking of doing this activity in two steps.

  1. Convert Oracle database to MySQL database.
  2. Writing stored procedure to copy table by table.

Are there any best practices while performing this kind of database migration from one RDBMS vendor to another? Are there any open-source or commercial tools available for this?

0

2 Answers 2

5

I recommend to do this migration in two steps.

  1. Use MySQL Workbench to migrate most of the db objects and data to MySQL (table data will be copied by this process too). See Using the MySQL Workbench Migration Wizard for details. This will leave you with manual work for specific objects like stored procedures. No tool can do an automatic migration as stored routines differ vastly between Oracle and MySQL.
  2. Use MySQL Workbench to reverse engineer the migrated db into a model.
  3. Use this model to adjust objects to your new schema structure.
  4. Synchronize the model to your server to apply the changes. Depending on what changes you made this might be non-destructive, but of course, having a backup is always a good idea.

You can repeat steps 3 and 4 as many times as you wish to incrementally adjust your schema. Synchronization will also take over any changes made in schema by others (two way sync).

Migration from Oracle to MySQL is not supported by MySQL Workbench. All my suggestions above are just that, ideas one can try out to get it at least partially working. Nothing of that is being tested, however, because, as I said, Oracle to MySQL migration is not supported.

0
0

I recently converted an Oracle DB into MySQL using a program called DBConvert There is a free version that inserts watermarks into large tables, but that can be fixed. ;) It's not perfect and might take some tinkering to fix up after the conversion.

Not the answer you're looking for? Browse other questions tagged or ask your own question.