Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: what query to ID the specific DBMS session?

Re: what query to ID the specific DBMS session?

From: Mladen Gogala <mgogala.SPAM-ME_at_not-at-verizon.net>
Date: Thu, 3 May 2007 19:17:03 +0200 (CEST)
Message-ID: <pan.2007.05.03.17.12.53@not-at-verizon.net>


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.com
Received on Thu May 03 2007 - 12:17:03 CDT

Original text of this message

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