Solved

how to take out word spool off at the end of a spool file

Posted on 2011-03-17
8
504 Views
Last Modified: 2012-05-11
I want to spool a file.  But I see spool off at the end of the spool file.

How to take out word spool off at the end of a spool file?  Thanks.
0
Comment
Question by:ewang1205
  • 5
  • 2
8 Comments
 

Expert Comment

by:sergio85
ID: 35157369
Try to use:

SQL> Spool on;
SQL> Spool c:\spooltext.txt;
SQL> Query;
SQL> Spool off;

And use the following aditional settings:
set echo off
set verify off
set feedback off
set headings off
set trimspool on
set termout off
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35157700
If you copy and paste the commands or use a UNIX here script you can see the spool off command.

Please post how you are running the script.
0
 

Author Comment

by:ewang1205
ID: 35159468
If I use the following, then I see SQL>  c:\spooltext.txt;  in the spool file.  How to get rid of that?  

SQL> Spool on;
SQL> Spool c:\spooltext.txt;
SQL> Query;
SQL> Spool off;

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35159499
Again, are you using copy/paste to get those commands into sqlplus?

Put the commands in a script file and 'execute' the script.
0
 

Author Comment

by:ewang1205
ID: 35159613
command is in spooltext.txt.  But, in the spool file, I see SQL>  @c:\test.sql.  The following how I run.  

SQL> Spool on;
SQL> Spool c:\spooltext.txt;
SQL> @c:\test.sql
SQL> Spool off;

0
 

Accepted Solution

by:
ewang1205 earned 0 total points
ID: 35159847
The last comment at the following link does the trick.  sqlplus -s

http://forums.oracle.com/forums/thread.jspa?threadID=922156&tstart=0
0
 

Author Comment

by:ewang1205
ID: 35160838
The last comment at the following link does the trick.  sqlplus -s

http://forums.oracle.com/forums/thread.jspa?threadID=922156&tstart=0 
0
 

Author Closing Comment

by:ewang1205
ID: 35187466
That is the solution.
sqlplus -s @file_name
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

713 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