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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: identifying sid of session coming accross db_link

Re: identifying sid of session coming accross db_link

From: Jared Still <jkstill_at_gmail.com>
Date: Fri, 10 Jun 2005 06:44:20 -0700
Message-ID: <bf463805061006443d7ab968@mail.gmail.com>


This will show logons via database links. Courtesy of Mark Bobak.

Select /*+ ORDERED */

substr(s.ksusemnm,1,10)||'-'|| substr(s.ksusepid,1,10) "ORIGIN",
substr(g.K2GTITID_ORA,1,35) "GTXID",
substr(s.indx,1,4)||'.'|| substr(s.ksuseser,1,5) "LSESSION" ,
s2.username,
substr(
decode(bitand(ksuseidl,11),
1,'ACTIVE',
0, decode( bitand(ksuseflg,4096) , 0,'INACTIVE','CACHED'),
2,'SNIPED',
3,'SNIPED',

'KILLED'
),1,1
) "S",
substr(event,1,10) "WAITING"
from x$k2gte g, x$ktcxb t, x$ksuse s, v$session_wait w, v$session s2 where g.K2GTDXCB =t.ktcxbxba
and g.K2GTDSES=t.ktcxbses
and s.addr=g.K2GTDSES
and w.sid=s.indx

and s2.sid = w.sid
/

On 6/9/05, Vlado Barun <vlado_at_cadre5.com> wrote:
>
> I have identified a session that is blocking other sessions in 8.1.7.0<http://8.1.7.0>
> .
> The session is coming accros a db_link from a 9.2.0.6 <http://9.2.0.6>database.
>
>
>
> How do I identify the sid of the session in the 9.2.0.6 <http://9.2.0.6>database?
>
>
>
> Vlado Barun, M.Sc <http://M.Sc>.
>
> Senior Data Architect, Cadre5
>
> www.cadre5.com <http://www.cadre5.com> <http://www.cadre5.com/>
>
>
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 10 2005 - 09:49:23 CDT

Original text of this message

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