Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unique spool filenames?

Re: Unique spool filenames?

From: Mike Moritz <mmoritz_at_netcom.com>
Date: 1997/05/07
Message-ID: <mmoritzE9tApA.Et7@netcom.com>#1/1

In article <336F454A.5852_at_hpd.abbott.com>, Brett Neumeier <neumebm_at_hpd.abbott.com> wrote:
>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
>

Brett,

Thank you much for your help!

There is one little problem with it that I don't know how to handle:

SQL> column unique_id new_value uid noprint
SQL> select userenv('SESSIONID') unique_id from dual;
SQL> spool filename.&UID
Illegal spool file name: "filename.     46080" (bad character: ' ')


I've tried all sorts of format commands on the 'column' statement with no luck. Any ideas?

If nothing else I will use 'spool &UID.filename'

Thanks again.

-- 
    __  __  _  _
   |  \/  |(_)| |__ ___                                      __o
   | |\/| || || / // -_)      Mike Moritz                  _ \<._
   |_|  |_||_||_\_\\___|      mmoritz_at_netcom.com      ____(_)/ (_)____
Received on Wed May 07 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US