 <p>I find it is handy to use SQL*Plus column variables within directives - for example, I'm often in a session and want to spool to a new file name to avoid overwriting another log that may already exist and do this (first three statements through an @file):</p> <pre><code>SQL&gt; column spr new_value spoolref SQL&gt; select user||'_'||abs(dbms_random.random) spr from dual; SQL&gt; spool &amp;spoolref ... do work here ... SQL&gt; spool off </code></pre> <p>I'll then find the new log by sorting by time - you could always use some strategy other than the random number if you prefer.</p>