SELECT a.inst_id,
a.sid,
a.USERNAME,
a.SCHEMANAME,
a.OSUSER,
a.machine,
a.TERMINAL,
a.LOGON_TIME,
a.PROGRAM,
a.STATUS,
b.name,
b.used
FROM gv$session a,
(SELECT n.inst_id, sid, n.name, s.VALUE used
FROM gv$statname n, gv$sesstat s
WHERE n.name IN
('opened cursors current',
'session cursor cache count')
AND s.statistic# = n.statistic# and n.inst_id=s.inst_id ) b
WHERE a.sid = b.sid and a.inst_id = b.inst_id
and b.name <> 'session cursor cache count'
order by b.used desc;
select distinct HASH_VALUE from v$open_cursor;
阅读(1151) | 评论(0) | 转发(0) |