Status Of Open Cursors

SQL To Get Status Of Open Cursors:

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;

OR

select o.sid, osuser, machine, count(*) num_curs
from v$open_cursor o,
v$session s
where user_name = ”
and o.sid=s.sid
group by o.sid, osuser, machine
order by num_curs desc;

OR

select a.value, s.username,s.program,s.terminal, 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 = ‘session cursor cache count’ ;

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply