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: Kenny Gump <kgump_at_mylanlabs.com>
Date: Tue, 4 May 1999 14:55:37 -0400
Message-ID: <372f427b.0@news.mountain.net>


Try the following:

declare

v_sid number;

begin
select userenv('sessionid')
into v_sid
from dual;

end;

This will give you the unique AUDSID value from the v$session view.

Kenny Gump
OCP 7.3 DBA Thomas Keller wrote in message <372F2606.F63A4DDA_at_debis.com>...
>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 - 13:55:37 CDT

Original text of this message

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