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
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-665939/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-665939/