Solved

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

Posted on 2011-03-17
8
477 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 76

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
 
LVL 76

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now