RE: Sqlplus spool question

RE: Sqlplus spool question

 

  

Try launching sql+ in silent mode (use -s flag) and add the following
SET commands to your script:
set newpage 0
set space 0
set linesize 80
set pagesize 0
set echo off
set feedback off
set heading off

you might have to adjust the linesize setting to fit your data.

-----Original Message-----
From: Zelli Brian
[mailto:oracledba-ezmlmshield-x16142663.[Email address protected]
Sent: Thursday, November 30, 2006 11:38 AM
To: LazyDBA Discussion
Subject: Sqlplus spool question


Hello all,
I have what I hope is a simple question. I am spooling results into a
unix file which I later read back into the script. How do I get rid of
the sql syntax that is still in the spool file? I need to read only the
file_name on the bottom. I had a bunch of set commands prior to the
spool but it showed up anyway.

Here is the spool file:
SQL> select file_name from sys.dba_data_files union
2 select name from v$controlfile union
3 select member from v$logfile union
4 select p.value||LOWER('/alert_'||d.name)||'.log'
5 from v$parameter p, v$database d
6 where p.name='background_dump_dest'
7 order by 1;

FILE_NAME

------------------------------------------------------------------------
--------
/u01/oracle/product/10.2.0/db_1/admin/orcl/bdump/alert_orcl.log

/u01/oracle/product/10.2.0/oradata/orcl/control01.ctl

/u01/oracle/product/10.2.0/oradata/orcl/control02.ctl

/u01/oracle/product/10.2.0/oradata/orcl/control03.ctl

/u01/oracle/product/10.2.0/oradata/orcl/example01.dbf

/u01/oracle/product/10.2.0/oradata/orcl/redo01.log

/u01/oracle/product/10.2.0/oradata/orcl/redo02.log

/u01/oracle/product/10.2.0/oradata/orcl/redo03.log

/u01/oracle/product/10.2.0/oradata/orcl/sysaux01.dbf

/u01/oracle/product/10.2.0/oradata/orcl/system01.dbf

/u01/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf



This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee
or agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited. If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html






Oracle LazyDBA home page