Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Current Session ID (SID) v$session
On Mon, 03 Aug 1998 21:20:14 GMT, creas002_at_mc.duke.edu wrote:
>Help!!!
>
> I'm trying to find a way that I can identify my current session
>(SID) in v$session.
>
>I have tried joining v$session with user_users, but I can only ensure
>my username is correct, but if I have multible sessions running from
>different terminals and/or applications I will get multiple rows.
>I need to be able to identify the unique SID, TERMINAL, APPLICATION
>for the current session.
>
>Any help is greatly appreciated.
Hi,
try this query:
SELECT *
FROM v$session
WHERE audsid = USERENV('SESSIONID');
HTH,
Peter
--
Peter Schneider
peter.schneider_at_okay.net
Received on Mon Aug 03 1998 - 17:34:18 CDT