define logname=date column clogname new_value logname select 'prefix_'||to_char(sysdate, 'yyyymmdd') clogname from dual; spool '&logname'If there is a need to have also name of database included into filename then it can be read from global_name view:
define logname=date column clogname new_value logname select 'prefix_'||substr(global_name,1, decode(dot,0,length(global_name),dot-1))|| to_char(sysdate, 'yyyymmdd') clogname from (select global_name, instr(global_name, '.') dot from global_name); spool '&logname'Hope you find it useful.
I would also like to share an photo I made in Rome in February this year

To see more pictures you are welcome to follow Rome 1, Rome 2, Rome 3
Cheers, Paweł



2 comments:
Another useful tip is that "." is the variable delimiter, so &var1..log appends ".log" to variable name.
Hi,
Thats great this is the one i was looking for.
Post a Comment