Thursday, December 3, 2015

How to check the Child sessions of a parent session

How to check the Child sessions of a parent session:
=======================================

Query:
=====

col EVENT for a30
col MACHINE for a25
col USERNAME for a15
set lines 300 pages 300
col wait_class for a10
col EVENT for a32
col osuser for a15
col SERVICE_NAME for a12
col blocking_session for 9999
col blocking_instance for 9999
col sid for 9999
select a.inst_id,a.sid,b.qcinst_id,b.qcsid,a.MACHINE,a.event,a.sql_id,a.osuser,a.USERNAME,a.last_call_et/60 R_TIME,
seconds_in_wait W_TIME,a.status from Gv$session a ,gv$px_session b where status='ACTIVE'
and b.qcsid=&qcsid and a.sid=b.sid(+)  and a.inst_id=b.inst_id(+)
 order by last_call_et/60;


INPUT: QCSID

QCSID is the parent session id

No comments:

Post a Comment