Understanding Open Cursor
967493Oct 16 2012 — edited Oct 17 2012Hi All, I am confused on this open cursor as I would like to understand further if I am hitting my limit. Currently I do not see the error that my open cursor exceeded.
If I add up the a.value on the second sql, I am getting more than 10k, but my open cursor is only set to 5000. I must be calculating this wrongly here.
open cursor = 5000
session_cached_cursors 200
select max(a.value), a.sid, b.program
from v$sesstat a, v$session b, v$statname c
where a.sid = b.sid
and a.statistic# = c.statistic#
and c.name = 'opened cursors current'
group by a.sid, b.program
order by 1 desc
MAX(A.VALUE) SID PROGRAM
------------ ---------- ------------------------------------------------
2201 596
516 514 abc@server1 (TNS V1-V3)
401 720 abc@server1 (TNS V1-V3)
602 670 abc@server1 (TNS V1-V3)
578 445 abc@server1 (TNS V1-V3)
..
..
..
129 rows selected.
Would like to know what is the current open cursor count?
If I get the sid like above, can I know what SQL is holding it up?