Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dynamic spool file name...

khallas301Feb 22 2013 — edited Feb 22 2013
friends,

any possibilities to do such thing in sql script?

trying to have dynamic spool file name during sql script run....
currently I have hard coded spool name but it's really inconvenient for user to edit sql everytime and change file name....
requires filename something like below..
e.g. spool $dbname_$dbuser_$dttime.log

user who is running doesn't have admin access.

test.sql
spool t1.log

set echo off
set termout off

select * from user.employees;

spool off;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2013
Added on Feb 22 2013
6 comments
12,261 views