Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic spool-file
Try :
spool tmp_spool.sql
select 'spool drive:\dir\query-'||to_char(sysdate,'HH24MI') from dual;
spool off
@tmp_spool
Jan Nowitzky <nowitzky_at_informatik.uni-jena.de> wrote in article
<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 - 10:42:13 CDT