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: Unique identifier for the session.

Re: Unique identifier for the session.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/07/04
Message-ID: <359e732e.1202499@192.86.155.100>#1/1

A copy of this was sent to "Asif H. rajwani" <asif.rajwani_at_mci2000.com> (if that email address didn't require changing) On Fri, 03 Jul 1998 22:52:22 GMT, you wrote:

>Hi,
> I want to get the unique identifier for the sesssion.
>I tried gettting session id using this query:
>
> select sid, username, user#, type from v$session where username =
> USER
>
> But it gives me multiple sid if the user is logon from more than one
> location or has multiple session on the same machine.
>
> Is there any way to get the identifier which is unique to a session.
>
> Thanks.
>
> Asif
> ===

select userenv('sessionid') from dual;

btw- to get your row from v$session you should:

select * from v$session where audsid = userenv('sessionid');  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Jul 04 1998 - 00:00:00 CDT

Original text of this message

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