Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 3:47 AM, Chris dmag...@gmail.com wrote:

 9el wrote:

 I found this command from one guy for importing Oracle's dump to MySQL

 Shell mysql -uroot db_name -vvf  oracle_dump.dmp

 But, v is for verbose and f is for force continuation.

 Anyone worked with Oracle and MySQL?


 Yep, and there's no way that will ever work except for the very simplest
  table and data.

 The datatypes are different (mysql doesn't have varchar2, timestamp formats
 are different though oracle lets you change that).

 You'll need to do a schema-only dump, convert it to the mysql format, then
 worry about converting the data.


Yes, before writing the mail I had this confusion but as my
max_packet_allowed was default to 16M I couldn't have been able to continue
with 28M dump from Oracle.
Now that I have the schema in MySQL already. What can I do to get data only
from Oracle's DB?
There are lots of software tools out there but I want to learn it from the
base. I cant afford to buy any software either.



 --
 Postgresql  php tutorials
 http://www.designmagick.com/




Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread Phpster

Extract to csv/XML?

Bastien

Sent from my iPod

On Apr 3, 2009, at 5:10, 9el le...@phpxperts.net wrote:


On Fri, Apr 3, 2009 at 3:47 AM, Chris dmag...@gmail.com wrote:


9el wrote:

I found this command from one guy for importing Oracle's dump to  
MySQL


Shell mysql -uroot db_name -vvf  oracle_dump.dmp

But, v is for verbose and f is for force continuation.

Anyone worked with Oracle and MySQL?



Yep, and there's no way that will ever work except for the very  
simplest

table and data.

The datatypes are different (mysql doesn't have varchar2, timestamp  
formats

are different though oracle lets you change that).

You'll need to do a schema-only dump, convert it to the mysql  
format, then

worry about converting the data.



Yes, before writing the mail I had this confusion but as my
max_packet_allowed was default to 16M I couldn't have been able to  
continue

with 28M dump from Oracle.
Now that I have the schema in MySQL already. What can I do to get  
data only

from Oracle's DB?
There are lots of software tools out there but I want to learn it  
from the

base. I cant afford to buy any software either.




--
Postgresql  php tutorials
http://www.designmagick.com/




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 5:21 PM, Phpster phps...@gmail.com wrote:

 Extract to csv/XML?


My main goal is to import the data from Oracle DB to mySQL for a live site I
wrote in php. I dont know a better way to do that.


RE: [PHP] Oracle's dump to MySQL

2009-04-03 Thread Bob McConnell
On Behalf Of 9el
 On Fri, Apr 3, 2009 at 5:21 PM, Phpster phps...@gmail.com wrote:
 
 Extract to csv/XML?

 
 My main goal is to import the data from Oracle DB to mySQL for a live
site I
 wrote in php. I dont know a better way to do that.

The strategy depends on how complicated the database is. If it is single
table, then Oracle can export that to a CSV file which MySQL can import.
You simply have to make sure the column types match. If it is more
complex, then you need to spend some time translating the relationships
from the Oracle schema into a MySQL schema. There is no one to one
correspondence here, in spite of the promises of the SQL standards. Once
you have done that, you may still be able to use the CSV files, but will
need to determine what order to import them and how to restore the
relevant indexes.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 8:56 PM, Bob McConnell r...@cbord.com wrote:

 On Behalf Of 9el


 The strategy depends on how complicated the database is. If it is single
 table, then Oracle can export that to a CSV file which MySQL can import.
 You simply have to make sure the column types match. If it is more
 complex, then you need to spend some time translating the relationships
 from the Oracle schema into a MySQL schema. There is no one to one
 correspondence here, in spite of the promises of the SQL standards. Once
 you have done that, you may still be able to use the CSV files, but will
 need to determine what order to import them and how to restore the
 relevant indexes.


I think this idea solves it a lot. i have like 4 to 7 tables only and both
database has the same schema. So, CSV would be a good idea. I just thinking
of a better idea to eliminate manual tasks it involves here.

And reading from CSV, that I can manage with phpCodes or using the params in
MySQL. READ Local INFILE



 Bob McConnell



Re: [PHP] Oracle's dump to MySQL

2009-04-02 Thread Igor Escobar
I'm in the Oracle/MySQL E-mail List ?

Regards,
Igor Escobar
systems analyst  interface designer
www . igorescobar . com



On Thu, Apr 2, 2009 at 6:26 AM, 9el le...@phpxperts.net wrote:

 I found this command from one guy for importing Oracle's dump to MySQL

 Shell mysql -uroot db_name -vvf  oracle_dump.dmp

 But, v is for verbose and f is for force continuation.

 Anyone worked with Oracle and MySQL?



Re: [PHP] Oracle's dump to MySQL

2009-04-02 Thread Chris

9el wrote:

I found this command from one guy for importing Oracle's dump to MySQL

Shell mysql -uroot db_name -vvf  oracle_dump.dmp

But, v is for verbose and f is for force continuation.

Anyone worked with Oracle and MySQL?


Yep, and there's no way that will ever work except for the very simplest 
 table and data.


The datatypes are different (mysql doesn't have varchar2, timestamp 
formats are different though oracle lets you change that).


You'll need to do a schema-only dump, convert it to the mysql format, 
then worry about converting the data.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php