Solved

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

Posted on 2011-03-17
8
509 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL2016 to ORACLE11G linked-server 6 79
oracle date format checking 7 57
return value in based on value passed 6 50
inserting value in table in oracle form 2 32
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

752 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