?
Solved

How to skip the extra text when using SPOOL in SQLPLUS

Posted on 2009-02-09
6
Medium Priority
?
780 Views
Last Modified: 2013-12-18
I written the following code, but the output is

SQL> select database from params;
MYDB                                                                                            

1 row selected.

SQL> spool off;

How to ONLY SPOOL THE RESULT WHICH is MYDB is my text file but not the other text?
Thanks!
set pages 0;
set heading off
set echo off;
spool c:\321.txt
select database from params;
spool off;

Open in new window

0
Comment
Question by:mawingho
6 Comments
 
LVL 14

Accepted Solution

by:
GGuzdziol earned 800 total points
ID: 23597611
You missed feedback I guess. Full list I use for spooling:
set echo off
set feedback off
set linesize 500
set trimspool on
set termout off
set pagesize 0

Open in new window

0
 
LVL 27

Assisted Solution

by:sujith80
sujith80 earned 800 total points
ID: 23597687
You need to save your commands as a script file on your disc say c:\test.sql and must run the script from sqlplus like

@c:\test.sql
0
 

Assisted Solution

by:Firozs
Firozs earned 400 total points
ID: 23599720
set echo off
set verify off
set termout off
set trimspool on
set feedback off
set underline off
set newp none
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:mawingho
ID: 23619093
Can anyone explain each option?
Are there any (Official) website explain these options?
0
 
LVL 14

Assisted Solution

by:GGuzdziol
GGuzdziol earned 800 total points
ID: 23619153
There is - so called Oracle Documentation ;-) Information about various SET switches is available  at http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm
0
 
LVL 27

Assisted Solution

by:sujith80
sujith80 earned 800 total points
ID: 23620161
you dont need any options other than
set heading off
set echo off;

did you try running it as a script?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question