1

Does anyone know how to write a specific command line that imports a .dmp file into an Oracle Express database, and then exports the data as a CSV file?

Any help would be greatly appreciated. Thank you!

JRNewm
  • 17
  • 6
  • http://www.orafaq.com/wiki/Import_Export_FAQ - find the imp executable and use it interactively to import your data. – Reeza Jan 09 '16 at 03:05
  • I was wondering whether you had any luck with this (I have a similar problem) and whether you could share your solution. Thanks! – mptevsion Feb 29 '16 at 14:47
  • Hello, thus far, no luck. I am dealing with a mid-90s Orahome server; I can't seem to work with the extracted .dmp files, nor successfully spool out the data. I think we are going to try to find a TOAD version that works and install it on the Oracle computer and work from there; I have been told that is the way to go. – JRNewm Feb 29 '16 at 14:53

1 Answers1

0

Import using impdp:

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

Then spool to csv:

set heading off
spool myfile.csv
select col1|','||col2 from my_tables;
set colsep ','
select * from my_table;
spool off;

Follow below links for help.

import: https://oracle-base.com/articles/10g/oracle-data-pump-10g spool to csv: http://www.dba-oracle.com/t_export_to_csv_file.htm

Shariar Imtiaz
  • 483
  • 1
  • 5
  • 15
  • Thank you for this information- I have several questions: 1) is the "scott/tiger@db10g" string a username/password@databasename, or is it the username/password of the developer? Also, can one change the "test_dir" where the .dmp file to a location on the locale PC? I am having trouble getting this to work; fairly new to Oracle. Any help very appreciated! – JRNewm Jan 15 '16 at 18:43
  • 1. username/password@databasename 2. yes you can change directory. for that you nee to create a new directory in db then you have give permission to the user you want to use for expdp or impdp. then you can change directory. but before that make it sure that the os user has permission on that directory. – Shariar Imtiaz Jan 16 '16 at 13:33