Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-17
8
Medium Priority
?
528 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

721 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