I need to retrieve certain data from an Oracle 11g release 1 database and provide it as one or more CSV files. The data resides in multiple tables and/or views. All this should work via the command line.
What would be the best approach to this?
How to unload Oracle database tables into a csv files
command lineexportoracleoracle-11g
Related Question
- Oracle 10g dump file into Oracle 11g database
- Update oracle sql database from CSV
- Global command to destroy all disconnected data files in Oracle 11g
- Incomplete sysaux expdp unload (ORACLE)
- How to automate CSV-exports of queries in PL/SQL Developer (Oracle)
- Oracle DB : Export only table data from from all tables of given schemas
- Postgresql – How to export data from multiple tables to csv from remote postgres server (AWS RDS) to local machine
Best Answer
Arun,
now that sqlcl is available fromOracle SQL Developer 4.1 EA2 (4.1.0.18.37) you can use it a lot like the old and famous sqlplus. sqlcl has an output format setting for csv
for more info about sqlcl checkout Kris' blog
before sqlcl was around easiest for this was to use APEX and export the report to csv. In plain old sqlplus you can do this by using
This works best if the results are to be written on an application server or client. If they have to be written on the database server, utl_file might be a better option.
Ronald.