[DB-SIG] need help
peter at monicol.co.uk
Tue Jan 4 17:35:14 CET 2005
I looked at second URL which actually gives a mapping between MySQL and
Oracl types. This is a bit of a mysqldump file:
-- Table structure for table 'categories'
DROP TABLE IF EXISTS categories;
CREATE TABLE categories (
category_name varchar(50) NOT NULL default '',
PRIMARY KEY (category_name)
-- Dumping data for table 'categories'
INSERT INTO categories VALUES
I'm suggesting that Linda generate the Oracle equivalen and the change the
CREATE TABLE dump with the equivalent MySQL types. Somrthing like this
surely works unless Oracle has no dump process which I find hard to believe
(well MSAcess doesn't but .)
From: Arjen Dijkstra [mailto:adijkstra at baandersconsultancy.nl]
Sent: 04 January 2005 14:27
To: Peter Mott
Cc: 'linda'; db-sig at python.org
Subject: Re: [DB-SIG] need help
I don't think that will work. Mysql has diverent types:
7249/toc.htm and especially:
Peter Mott wrote:
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.
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
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)
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
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.
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..
> > - Communicate instantly..."Ping" your friends today! Download
DB-SIG maillist - DB-SIG at python.org
DB-SIG maillist - DB-SIG at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the DB-SIG