Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: what query to ID the specific DBMS session?
On Thu, 03 May 2007 09:39:12 -0500, Brian Peasland wrote:
> SESSIONID returns the "auditing session identifier". This value
> corresponds to the AUDSID column of V$SESSION. So you can obtain the SID
> from V$SESSION as follows:
>
> SELECT sid FROM v$session
> WHERE audsid=SYS_CONTEXT('USERENV','SESSIONID');
>
> This is just one more method to be lumped in with the others that have
> been offered in this thread....
>
> Cheers,
> Brian
My favorite trick is this:
SQL> select sid from v$mystat s,v$statname n 2 where n.STATISTIC#=s.STATISTIC# and 3 n.name='user commits';
SID
941
SQL>
-- http://www.mladen-gogala.comReceived on Thu May 03 2007 - 12:17:03 CDT
![]() |
![]() |