MySQL Forums
Forum List  »  Oracle

Re: porting data from oracle to mysql
Posted by: Josh Chamas
Date: November 17, 2004 11:36PM

manish singh wrote:
> ...
> so considering the process i mentioned above,
> what do you guys think
> is it a good enough process? i mean we will
> eventually move maybe a couple hundred
> tables from the 3 oracle databases( not everything
> is required) .

Writing a set of batch SQL scripts can work, but your QA and
debugging of this process needs to be done outside of the scripts
themselves. If what you want to know is to guarantee that the
entire process ran without SQL errors, then mysql client by default
will stop on the first SQL error, so that is easy enough.

But if you want to do things like make sure no data conversion errors
occured due to column type mismatch, there will not be much
help for you here. If you use LOAD DATA INFILE, it will tell
you how many warnings there were, so you could just check
to make sure the output from that showed 0 errors after you
are done to verify that there were no data conversion issues.

> in the test system i created for one table , i
> did the data transformation for the particular
> fields in my sql query itself. is there a way
> mysql can help me here
> does it have any process that can do data
> transformation for me automatically?

MySQL will do data conversion automatically if the data does
not fit into a field of a certain type, for example a string will
become 0 if inserted into a numeric field. MySQL 5.x I believe
will be offering a strict mode that will throw errors instead of
doing implicit data conversion which might be something that you
want here.

> and error handling, as iam just using SQL
> scripts iam not able to conjure up a design
> which would help me trap errors thrown by mysql
> and maybe display them or create a log file which
> would maybe mailed to the concerned people later

To trap errors on the fly, you should really do this programmatically,
then you could do things like check return values from SQL
statement executions, log warnings and so on. This gets back
to scripting an ETL process in Java JDBC or Perl DBI for example.



Josh Chamas
Director, Professional Services
MySQL Inc.,
Get More with MySQL!

Options: ReplyQuote

Written By
October 25, 2004 12:26AM
November 16, 2004 06:54PM
November 16, 2004 09:47PM
November 17, 2004 09:54PM
Re: porting data from oracle to mysql
November 17, 2004 11:36PM
November 21, 2004 10:05PM
November 22, 2004 04:18PM
November 23, 2004 12:29AM
November 23, 2004 01:07PM
November 23, 2004 11:39PM
November 24, 2004 12:06AM
November 24, 2004 02:10AM
November 24, 2004 03:36AM
November 24, 2004 04:43AM
November 24, 2004 03:49PM
November 25, 2004 01:52AM
January 13, 2005 01:42AM
September 05, 2007 10:18AM
January 14, 2008 02:38PM
February 09, 2005 01:22AM
February 10, 2005 05:18PM
March 14, 2007 03:02AM
February 06, 2009 02:07PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.