RE: spool file

From: Powell, Mark <mark.powell2_at_hp.com>
Date: Mon, 21 Dec 2009 16:02:26 +0000
Message-ID: <7C4BF3B32B80CC44AE37D31B172415933A5DCB34E8_at_GVW1337EXC.americas.hpqcorp.net>



One way to obtain the desired result is to issue a file rename command from the SQLPlus script

spool my_file
.... some work
spool off
host mv my_file.lst my_file

Naturally when the spool file is created from sqlplus scripts executed from OS shell scripts the file name can be changed in the shell script.



From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Daniel Fink Sent: Sunday, December 20, 2009 4:23 PM
To: joe_dba_at_hotmail.com
Cc: oracle-l_at_freelists.org
Subject: Re: spool file

Ignore the previous email. I misread it.

To create a spool file without any extension you have to use the method you describe or redirect the output from sql*plus. The problem with redirecting the output is you can have only one spool file per session.

oracle_at_daniel-desktop:~$ sqlplus -s / as sysdba <<EOF >>test
> select 'x' from dual;
> EOF

oracle_at_daniel-desktop:~$ ls -lart test -rw-r--r-- 1 oracle oinstall 8 2009-12-20 14:21 test oracle_at_daniel-desktop:~$ more test

'
-
x

oracle_at_daniel-desktop:~$

--
Daniel Fink

OptimalDBA    http://www.optimaldba.com
Oracle Blog   http://optimaldba.blogspot.com

Lost Data?    http://www.ora600.be/





Joe Smith wrote:
Is there a way to create a spool file without the .lst extension?

I have seen examples of hosting out of the session and renaming the file , but is there a way to create the spool file from the beginning with no extension?


thanks.

________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.<http://clk.atdmt.com/GBL/go/171222985/direct/01/>



--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 21 2009 - 10:02:26 CST

Original text of this message