Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to export a table using sqlplus instant client same like SQL Developer client.

3709913May 17 2018 — edited May 29 2018

Hi Team,

I would like to export a table using sqlplus(instantclient) client remotely. I am database user(schema user) and not database administrator.

Below link gives how to export table using sql developer UI client. Iam sure this can be done through using command line also using instantclient.

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev/r30/SQLdev3.0_Import_Export/sqldev3.0_import_export.…

I have some code like below to export table data in csv format but it is not same as when i export the table using SQL Developer client using UI.

set colsep ,   -- separate columns with a comma
set pagesize 0   -- No header rows
set trimspool on -- remove trailing blanks
set headsep off  -- this may or may not be useful...depends on your headings.
set linesize X  -- X should be the sum of the column widths
set numw X  -- X should be the length you want for numbers (avoid scientific notation on IDs)
spool myfile
.csv

why its not possible to do using sqlplus( instantclient ) when it is possible to do through SQL Developer. Both are clients connecting to database using schema name and password.

Please help to get the exact functionality same as SQL Developer for exporting table. I am trying

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2018
Added on May 17 2018
32 comments
3,993 views