Re: Current Session Identifier

From: Vikas Agnihotri <vikas_at_mink.att.com>
Date: 1996/06/12
Message-ID: <31BEB5F0.4745_at_mink.att.com>#1/1


There is a new V$ view in 7.2.2 called V$MYSTAT (!) which has what you need.Basically a sub-set of V$SYSSTAT only for the session executing the query. Quite a useful view, I would say.

Regards,
Vikas Agnihotri
vikas_at_mink.att.com

James Peterson wrote:
>
> Hi,
>
> I think this is not quite correct. userenv('SESSIONID') does return a
> session id for auditing purposes but this is not the same sid as is
> stored in v$session. However a variation may be closer.
>
> select sid
> from v$session
> where terminal = userenv('TERMINAL');
>
> This returns an accurate sid in my environment. The SQL Language
> Reference says it will behave differently for a distributed SQL
> statement. I have not tried that.
Received on Wed Jun 12 1996 - 00:00:00 CEST

Original text of this message