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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Parameter to teh spool command

Re: Parameter to teh spool command

From: Witold Iwaniec <wiwaniec_at_novalistech.com>
Date: Tue, 30 May 2000 13:38:30 -0300
Message-Id: <10513.107131@fatcity.com>


Thanks, but it works only in SQL*Plus.
In a simplest test - I created a two line script test.sql:

spool off
spool &1

when called from server manager prompt, on SUN Solaris:

SVRMGRL> @test.sql my_log.txt

creates spool file &1.log. And similar if I use $1 - it creates file $1.log. The same happens when I call the script from server manager in DOS.

I guess I have to live with SQL*Plus

Thanks

Witold

On 30 May 2000, at 7:37, Steve Boyd wrote:

> Very simple indeed. Just use &1 for the first argument, &2 for the second,
> etc.
>
> Of course, you can set define to something other than &, but why?
>
>
> >From: "Witold Iwaniec" <wiwaniec_at_novalistech.com>
> >Reply-To: ORACLE-L_at_fatcity.com
> >To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> >Subject: Parameter to teh spool command
> >Date: Tue, 30 May 2000 06:16:40 -0800
> >
> >Hi all
> >
> >I guess it is very simple but I must be missing something...
> >
> >I would like to use a parameter for the spool filename so that I can
> >run my script number of times and keep all spool files.
> >But using:
> >
> >spool $1.log
> > (or spool %1.log in Windows)
> >does not do it.
> >
> >Can I do it in the sql script or do I have to go for other tools to
> >generate the file name and open it?
> >
> >Regards
> >
> >Witold
> >======================================
> >Witold Iwaniec
> >Senior Software Developer
> >NovaLIS Technologies
> >wiwaniec_at_novalistech.com
> >http://www.novalistech.com
> >--
> >Author: Witold Iwaniec
> > INET: wiwaniec_at_novalistech.com
> >
> >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> >San Diego, California -- Public Internet access / Mailing Lists
> >--------------------------------------------------------------------
> >To REMOVE yourself from this mailing list, send an E-Mail message
> >to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> >the message BODY, include a line containing: UNSUB ORACLE-L
> >(or the name of mailing list you want to be removed from). You may
> >also send the HELP command for other information (like subscribing).
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> --
> Author: Steve Boyd
> INET: pimaco_oracle_at_hotmail.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Tue May 30 2000 - 11:38:30 CDT

Original text of this message

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