Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL*Plus Spooling Question

Re: SQL*Plus Spooling Question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 17 Jul 2001 23:51:48 +0200
Message-ID: <tl9cnjq7mehrd5@beta-news.demon.nl>

"Buck Turgidson" <jc_va_at_hotmail.com> wrote in message news:f98999c8.0107171054.7628ec35_at_posting.google.com...
> I have a bunch of long running scripts that I need to run, and I
> always use a standard header in each. Is there a symbolic parameter
> that I can use such that the filename will be used in the .lis file?
> E.g. I want the following (assume ALTER.SQL)
>
> SET ECHO ON
> SET SCAN OFF
> SET AUTOTRACE OFF
> SET PAUSE OFF
> SPOOL C:\LIS\ALTER.LIS
> WHENEVER SQLERROR EXIT SQL.SQLCODE;
> SELECT * FROM GLOBAL_NAME;
>
> to be
>
> SET ECHO ON
> SET SCAN OFF
> SET AUTOTRACE OFF
> SET PAUSE OFF
> SPOOL C:\LIS\%FILE.LIS < -- Symbolic for filename
> WHENEVER SQLERROR EXIT SQL.SQLCODE;
> SELECT * FROM GLOBAL_NAME;
You can use substitution variables (aka defines) in your filename. spool &filnam..lis

does work ok

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Tue Jul 17 2001 - 16:51:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US