Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic spool-file
You can use a SQL*Plus variable like that:
Column d noprint new_value date_
select to_char(sysdate, 'YYYY_MM_DD_HH24_MI_SS') d from dual;
spool Drive:\Dir\query-&date_..log
...
spool off
So the name of the spool is something like: query-1999_10_20_18_08_41.log
--
Have a nice day
Michel
Jan Nowitzky <nowitzky_at_informatik.uni-jena.de> a écrit dans le message :
380DDE52.788026C8_at_informatik.uni-jena.de...
> Hi,
>
> I want to start sql-scripts n-times during one night and log the results in
> a separate Logfile.
> So that never will be overwritten an old Logfile, I will create
> time-dependent Logfile-Names.
>
> example: my_script
>
> spool Drive:\Dir\query-xxxxx.log
>
> select * from test:
>
> spool off
>
> How can I fill the xxxxx with the current date (timestamp)? Not manually,
> because the scipt will startet at 1 am, 3 am ...
> These scripts should be run with svrmgrl (not sqlplus), because within the
> svrmgrl the set_timing-capability will be preferred.
>
> Bye, Jan
>
> --------------------------------------------------------------
> Jan Nowitzky
> Friedrich-Schiller-Universität o Institut für Informatik
> E-Mail nowitzky_at_informatik.uni-jena.de
> --------------------------------------------------------------
Received on Wed Oct 20 1999 - 11:09:35 CDT