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.

Regards,

Josh

Josh Chamas
Director, Professional Services
MySQL Inc., www.mysql.com
Get More with MySQL! http://www.mysql.com/consulting

Options: ReplyQuote


Subject
Views
Written By
Posted
16811
October 25, 2004 12:26AM
13171
November 16, 2004 06:54PM
44709
November 16, 2004 09:47PM
14270
November 17, 2004 09:54PM
Re: porting data from oracle to mysql
10438
November 17, 2004 11:36PM
8218
November 21, 2004 10:05PM
13763
November 22, 2004 04:18PM
6599
November 23, 2004 12:29AM
6031
November 23, 2004 01:07PM
5628
November 23, 2004 11:39PM
6030
November 24, 2004 12:06AM
5064
November 24, 2004 02:10AM
6247
November 24, 2004 03:36AM
4419
November 24, 2004 04:43AM
4831
November 24, 2004 03:49PM
4914
November 25, 2004 01:52AM
4991
January 13, 2005 01:42AM
7534
September 05, 2007 10:18AM
8242
January 14, 2008 02:38PM
6686
February 09, 2005 01:22AM
6117
February 10, 2005 05:18PM
6291
March 14, 2007 03:02AM
5858
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.