Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unique identifier for the session.
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
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
![]() |
![]() |