[DB-SIG] need help
peter at monicol.co.uk
Tue Jan 4 15:04:26 CET 2005
I don't know Oracle but there should be (surewly must be) an option to dump
the contents of a database or table to SQL (in MySQL it is mysqldump) after
which you can tweak the SQL and then simply run it from within the MySQL
monitor: eg source oracle.sql where your dump file was called oracle.sql
You may evenb be ablke toi get away without tweaking the SQL at all. In
principle it should not be needed.
> -----Original Message-----
> From: db-sig-bounces at python.org [mailto:db-sig-bounces at python.org] On
> Behalf Of Carey David SSgt 109CF/SCBJ
> Sent: 04 January 2005 12:48
> To: 'linda'; 'db-sig at python.org'
> Subject: RE: [DB-SIG] need help
> It seems a little vague what your trying to do, but I have a suggestion
> what I can gather.
> go into oracle, at the prompt you need to describe your table. If your
> is called 'customers' you would type
> desc customers
> it would give you something that looks like the following.
> Name Null? Type
> ------------------------------- -------- ----
> CUST_ID NOT NULL NUMBER(5)
> CUST_NAME NOT NULL VARCHAR2(20)
> CUST_PHONE VARCHAR2(10)
> Print this out or hand copy it. I'm almost positive that the datatypes
> oracle will not match up 100% with the datatypes of MySQL, but I don't
> my SQL Bible on me at the moment to look. This is still fine though
> a lot of the common data types such a char and varchar should match up no
> problem. There are tables you can find on the web that will tell you what
> datatypes MySQL supports. Go into MySQL and create your new table from the
> information you pulled from the oracle describe. I assume since your using
> oracle, your familiar with creating tables with SQL, and SQL is SQL pretty
> much across most databases. That is how I would convert the table. If I
> to do more then several, then I would probably write a python program to
> it ;-)
> Now if you have data that you want to move from one table to the next, I'm
> not sure what exactly would be the best method for you. It depends on your
> situation. Me personally, I would write a program with 2 database
> connections. One to the Oracle database and the other to the MySQL
> As the program was iterating through a select statement I would
> simultaneously have it performing insert statements to the MySQL table I
> previously created. Another way might be to put it into a csv file, copy
> to your other machine, then import it somehow.
> This is my suggestion. I'm far from a pro at either Oracle or MySQL so
> might be some other way that I don't know of, but as far as I know there
> isn't just one simple program or way to do it. However I'm sure if there
> someone more knowledgeable then myself on the list will comment.
> David Carey
> Stratton ANGB
> Scotia, NY
> From: linda [mailto:linda_ferrari9 at yahoo.com]
> Sent: Monday, January 03, 2005 9:02 PM
> To: db-sig at python.org
> Subject: [DB-SIG] need help
> my name is linda.. i'm student, ineed your help in
> how to convert table in oracle into mysql..
> how to do it that.. i search all in web how to convert that but
> their is no solution for me..
> i really need your help for my problem..
> Yahoo! Messenger
> m> - Communicate instantly..."Ping" your friends today! Download
> DB-SIG maillist - DB-SIG at python.org
More information about the DB-SIG