With Oracle expdp, I can export the tables I want with
expdp INCLUDE=TABLE:table1,table2,table3
I need a way to convert this into CSV on a linux machine. I've seen Windows tools but don't know how good they are and this needs to work from linux command line/ bash script.
Is this possible?
-
How does the file look? (I'm not a dba) Give me a head on one file.Florin Ghita– Florin Ghita2012年02月24日 07:59:19 +00:00Commented Feb 24, 2012 at 7:59
-
@FlorinGhita expdp generated files are binary & not human-readablePhilᵀᴹ– Philᵀᴹ2012年04月04日 14:09:03 +00:00Commented Apr 4, 2012 at 14:09
3 Answers 3
No its not possible with expdp, you need to use utl_file to solve this
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:88212348059
-
Note that the linked discussion goes back some 11 years. The utilities supplied for this purpose have changed over the years.Walter Mitty– Walter Mitty2012年03月05日 13:43:24 +00:00Commented Mar 5, 2012 at 13:43
-
You'd be better off using an external tablePhilᵀᴹ– Philᵀᴹ2012年04月04日 14:09:20 +00:00Commented Apr 4, 2012 at 14:09
-
@Phil he want to write outside the database some tables. How can be useful an external table? Can you write it?Florin Ghita– Florin Ghita2012年04月04日 14:16:04 +00:00Commented Apr 4, 2012 at 14:16
-
Actually, I tell a lie. You can't write to external tables. I really shouldn't post on here when sleepy! :) Are you on Windows or Unix?Philᵀᴹ– Philᵀᴹ2012年04月04日 14:22:49 +00:00Commented Apr 4, 2012 at 14:22
-
I'm not the poster. You are really sleepy :))Florin Ghita– Florin Ghita2012年04月04日 14:23:57 +00:00Commented Apr 4, 2012 at 14:23
You can also use sqlplus
and spool the output. You can find info about the syntax on the internet, searching sqlplus tutorials.
login oracle linux
sqlplus / sysdba
spool "/home/oracle/file.csv";
SELECT * from dual;