Solved

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

Posted on 2011-03-17
8
515 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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.
Suggested Courses

628 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