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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting SID in PL/SQL

Re: Getting SID in PL/SQL

From: Ron Reidy <rereidy_at_uswest.net>
Date: Tue, 04 May 1999 21:37:35 -0600
Message-ID: <372FBCFF.58E98325@uswest.net>


Can you normally select from V$SESSION? If not, you will need to get access to this view.

Maybe a better thing to do (since I don't know if you want a number or a string) is to use DBMS_PIPE.unique_session_name. Or maybe better yet to call tmpnam(3) from the C run time library. Or use the random number generator package from O8 (sorry, my client is too chicken to go to 8 and I don't have installed on my PC yet), or download the random number generator package from technet, etc.

rr

Thomas Keller wrote:

> Hi,
>
> I need a value that's unique at a time (but all values should be in the
> smallest possible range). My idea was to use the SID (for example from
> V$SESSION).
> Is it possible to get the Value from anywhere? When I try a SELECT from
> V$SESSION in a package I get an error when compiling the package...
>
> Any Ideas?
>
> Thomas Keller


Received on Tue May 04 1999 - 22:37:35 CDT

Original text of this message

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