select o.sid, oSUSEr, machine, count(*) num_curs
from v$open_cursor o, v$session s
where user_name = 'RPTPRD' and o.sid=s.sid
group by o.sid, osuser, machine
order by num_curs desc;
select a.value, s.username, s.sid, s.serial# from v$sesstat a
, v$statname b, v$session s where a.statistic# = b.statistic#
and s.sid=a.sid and b.name = 'opened cursors current' and s.username is not null;
SELECT * FROM V$OPEN_CURSOR WHERE SQL_TEXT LIKE 'INSERT%';
SELECT MAX (a.VALUE) AS highest_open_cur, p.VALUE AS max_open_cur
FROM v$sesstat a, v$statname b, v$parameter p
WHERE a.statistic# = b.statistic#
AND b.name = 'opened cursors current'
AND p.name = 'open_cursors'
GROUP BY p.VALUE;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15412087/viewspace-1790867/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15412087/viewspace-1790867/