Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unique spool filenames?
Mike Moritz wrote:
>
> Is there a way within SQLPlus to create unique filenames for spool
> files. In unix one can use 'filename.$$' which will append the
> process ID. Can I do something similar from SQLPlus, running under
> unix?
Surely. You can use the auditing session identifier, obtained using userenv('SESSIONID').
Try this:
column unique_id new_value uid noprint
select userenv('SESSIONID') unique_id from dual;
spool filename.&UID
(yes, it's more bother than it is for Unix. So what's your point?)
-bn
neumebm_at_hpd.abbott.com
Received on Tue May 06 1997 - 00:00:00 CDT