Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Oracle > Export oracle data in comma separated value format

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-02, 13:01
luvcal luvcal is offline
Registered User
 
Join Date: Aug 2001
Posts: 4
Export oracle data in comma separated value format

Is there any way to export data into a comma separated value file format in Oracle?? Thanks for any and all help.
Reply With Quote
  #2 (permalink)  
Old 04-15-02, 02:28
Ruudboy Ruudboy is offline
Registered User
 
Join Date: Apr 2001
Location: Netherlands
Posts: 170
Hi,

You can use the tool SQL Loader for that.
For a manual on how it works look here:
http://technet.oracle.com/docs/produ.../ch03.htm#2436
__________________
Ruud Schilders
-----------------
Oracle DBA
e-mail : ruudboy@gmail.com
URL : www****udschilders.com
ICQ : 397543
MSN: ruudboy@hotmail.com
For Oracle DBA's only:
http://www.oracledbaforum.com
Reply With Quote
  #3 (permalink)  
Old 04-29-02, 04:12
fromeast fromeast is offline
Registered User
 
Join Date: Apr 2002
Location: China
Posts: 2
SQL Loader can not be used to export data!

It can only load data into Oracle.

You can export data in text format by using Excel, TOAD etc.
Reply With Quote
  #4 (permalink)  
Old 04-29-02, 05:01
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
just do a sql script!
Code:
set termout off set hea off set pagesize 0 spool c:\whatever.csv select a.a||','||a.b||','||a.c from a where a.a="whatever"; spool off

should be quite fast. remeber the ; at the end of the sql select
Reply With Quote
  #5 (permalink)  
Old 04-29-02, 09:24
Ruudboy Ruudboy is offline
Registered User
 
Join Date: Apr 2001
Location: Netherlands
Posts: 170
Re: SQL Loader can not be used to export data!

Quote:
Originally posted by fromeast
It can only load data into Oracle.

Ahh.. duh.. should read better, before answering
Thought it was for reading comma seperated files. Sorry

Yes, the way rhs98 mentiones is the best I guess.
Ruud
__________________
Ruud Schilders
-----------------
Oracle DBA
e-mail : ruudboy@gmail.com
URL : www****udschilders.com
ICQ : 397543
MSN: ruudboy@hotmail.com
For Oracle DBA's only:
http://www.oracledbaforum.com
Reply With Quote
  #6 (permalink)  
Old 05-08-02, 00:44
kerlion kerlion is offline
Registered User
 
Join Date: Apr 2002
Location: beijing,china
Posts: 20
PL/SQL Developer can do it ease
__________________
db2oracle
Reply With Quote
  #7 (permalink)  
Old 05-08-02, 16:31
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
oh yeah, remeber if your using this more than once, to use bind variables in the sql; as it can/does speed things up alot
Reply With Quote
  #8 (permalink)  
Old 05-11-02, 13:15
rayvid123 rayvid123 is offline
Junior Member
 
Join Date: May 2002
Posts: 11
I would suggest following ways to perform export data from Oracle:

1> Use serveroutput settings and DBMS_OUTPUT.PUT_LINE
Disadvantage: Every line is buffered to a buffer. Minimum buffer is of 2000 bytes and maximum is of 1,000,000 bytes. Performance is screwed up and has limitation. Besides I think DBMS_OUTPUT.PUT_LINE should be used to find out logical errors, but if this is a temporary project, go for it. DBMS_OUTPUT is not designed to be a report writer. It is meant to be used for debugging. It is not really powerful enough for much more than this. The procedures in this package provide much the same functionality as the printf() function in C.

2> Use Select from sqlplus:
If you want to create a production job using select, seek some other profession or retire yourself from database field. Again if this is a temporary project, rather than spending your organizations’ valuable time in coding “C”, or sqlJ, go with this solution.

3> Best and simple way use Pro*C. U can manipulate, twist, grind do whatever you want to using "C".

4> Use SqlJ

There are many ways for doing this. It depends on to what level your supervisor is stupid/not-technical. Usually in a non-professional organization the supervisor would suggest you to do in a very simple way not really knowing the correct, appropriate ways of doing and ignoring the long-term consequences. If you work for a professional technical supervisor, he/she will advise any one of the above or may be some other ways that I haven’t listed above.

Hope this answers your question. Feel free to comment to my above discussion.

Last edited by rayvid123 : 05-12-02 at 17:30.
Reply With Quote
  #9 (permalink)  
Old 01-13-05, 16:45
john_miller john_miller is offline
Registered User
 
Join Date: Aug 2004
Posts: 17
fast export oracle tables into flat file

Quote:
Originally Posted by luvcal
Is there any way to export data into a comma separated value file format in Oracle?? Thanks for any and all help.

If your tables in Oracle are not big or you need to perform oracle data extract in test environment, then all suggestions above should work.

If you large tables (millions of rows or even terabytes of data), blob type, chained rows,.. etc, you may want consider third party tool. Especially if you need to unload data quickly from production server with no adding cpu overhead. I would suggest wisdomforce Fastreader www.wisdomforce.com .

Fastreader is really fast, support all features that production DBA need and also generates loaders for not just Oracle, but also DB2, MySQL, SQL Server. This is very convinient for automating migrate process.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On