How to import a .dmp file (Oracle) into MySql DB?

こ雲淡風輕ζ 提交于 2019-12-10 02:52:46

问题


The .dmp is a dump of a table built in Oracle 10g (Express Edition) and one of the fields is of CLOB type.

I was trying to simply export the table to xml/csv files then import it to the MySql, but the export simply ignored the CLOB field... (I was using sqldeveloper for that).

I noticed this post explaining how to extract the CLOB to text file but it seems to miss the handling of the other fields or at least the primary key fields. can it be adopted to create a csv of the complete table? (I am not familiar with plsql at all)

As the brute force approach, I can use my python interface to simply query for all the records and spool it to a flat file but I'm afraid it will take a LOOOONG time (query for all records replace all native commas with the ascii... )

Thanks guys!


回答1:


if you can get the mysql server and the oracle server on the same network, you might want to look at the mysql administrator tools, which includes the migration toolkit. you can connect to the oracle server with the migration toolkit and it will automatically create tables and move data for you.




回答2:


Here is a documentation explaining the migration process: http://www.mysql.com/why-mysql/white-papers/mysql_wp_oracle2mysql.php

and you can use Data Wizard for MySQL . Trial version is fully usable for 30 days.




回答3:


After about 2 hours of installing and uninstalling the MySql on the same machine (mylaptop) in order to use the migration tool kit as suggested by longneck, I decided to simply implement the dump and here it is for the likes of me that have minimal admin experience and get hard time to make both DBs work together (errors 1130, 1045 and more).

Surprisingly, it is not as slow as I expected: OraDump

Any comments and improvements are welcomed.



来源:https://stackoverflow.com/questions/1667705/how-to-import-a-dmp-file-oracle-into-mysql-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!