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.
Peter > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Carey David SSgt 109CF/SCBJ > Sent: 04 January 2005 12:48 > To: 'linda'; '[email protected]' > Subject: RE: [DB-SIG] need help > > It seems a little vague what your trying to do, but I have a suggestion > from > what I can gather. > > go into oracle, at the prompt you need to describe your table. If your > table > 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 > from > oracle will not match up 100% with the datatypes of MySQL, but I don't > have > my SQL Bible on me at the moment to look. This is still fine though > because > 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 > had > to do more then several, then I would probably write a python program to > do > 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 > database. > 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 > it > to your other machine, then import it somehow. > > This is my suggestion. I'm far from a pro at either Oracle or MySQL so > there > 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 > is, > someone more knowledgeable then myself on the list will comment. > > David Carey > Stratton ANGB > Scotia, NY > > ________________________________ > > From: linda [mailto:[EMAIL PROTECTED] > Sent: Monday, January 03, 2005 9:02 PM > To: [email protected] > Subject: [DB-SIG] need help > > > hello.. > 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.. > > thanks > LINDA > > > > linda > > ________________________________ > > Yahoo! Messenger > <http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo. > co > m> - Communicate instantly..."Ping" your friends today! Download > Messenger > Now > <http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo. > co > m/download/index.html> > > _______________________________________________ > DB-SIG maillist - [email protected] > http://mail.python.org/mailman/listinfo/db-sig _______________________________________________ DB-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/db-sig
