Since I know Oracle, MySQL, and Java the fastest way I did it was:

1) I created scripts for creating the tables in both DBs (this is the way I 
usually do). They differ a bit on datatypes, and I had to remove all the 
foreign key when dealing with MYSQL. I have 2 scripts called makeOraDB.sql 
and makeMySQLDB.sql that will call others scripts and generate the dbs in 
both environments any time I run them. If I need to update or fix the 
schemas all I need to do is run the scripts again.

2) I created a class in java to deal with the migration and persistence. 
This class creates 2 connections one with Oracle and another with MySQL. I 
read the rows in Oracle into a resultset and then I navigate this result set 
and for every row I do an insert in the MySQL DB.

Notice that this is a one shot process. The MySQL tables are completely 
empty in the beginning of this process.

Notice also that the scripts for generating the DB are used in a development 
environment. In production it would make no sense dropping and generating 
the DBs again and again. I am in a development process.

If you are in a production environment, with your Oracle DB completely 
populated with data, you can just work on the MYSQL scripts and the java 
migration class.

In summary: I did everything from scratch, completeluy manually. No tools 
involved.

If someone know a better way please let me know.

Siomara


>From: "Kishore Balasubramanya" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Getting data from Oracle to Mysql
>Date: Wed, 19 Sep 2001 11:50:27 -0400
>
>Hi,
>
>Can anybody tell me how to get all the data and the table structures
>from Oracle to Mysql.
>
>Thanks,
>
>Kishore
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to