获取当前所有会话等待事件信息

select s.sid,s.username,s.event,s.wait_time,s.state,s.seconds_in_wait,p.PROGRAM,s.MACHINE,
(select c.SQL_FULLTEXT from v$sqlarea c where c.SQL_ID=s.SQL_ID) sql_fulltext,
(select c.BIND_DATA from v$sqlarea c where c.SQL_ID=s.SQL_ID) BIND_DATA,s.SQL_ID,
s.P1TEXT,s.p1,s.p1raw,s.P2TEXT,s.p2,s.P2RAW,s.P3TEXT,s.P3,s.P3RAW
from v$session s,v$process p
where s.username is not null and s.PADDR=p.ADDR
and s.event not like’%SQL*Net%’
order by s.wait_time desc

发表评论

电子邮件地址不会被公开。