檢視當前使用者正在等待事件

muxinqing發表於2014-02-11


Select distinct
a.sql_text,b.event,b.logon_time,b.username,a.CPU_TIME/
1000/a.executions "cpu
ms",b.event#,b.sid,b.serial#,b.service_name,b.module "
應用程式" ,c.value,d.name
from v$sqlarea
a,v$session b,V$SESStat c,v$statname d
where a.sql_id=b.sql_id and b.sid=c.sid and c.STATISTIC# =
d.STATISTIC#
and b.status = 'ACTIVE' and  b.event not in('SQL*Net message from client','SQL*Net message to
client'
,'SQL*Net more data
to client'
,'client message','virtual circuit
status'
,'parallel query idle
wait - Slaves'
,' parallel query
dequeue wait'
,'lock element
cleanup'
,'dispatcher timer','pmon timer- pmon','rdbms ipc message','Space Manager:
slave idle wait'
) order by b.logon_time desc;



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29065182/viewspace-1079440/,如需轉載,請註明出處,否則將追究法律責任。

相關文章