November 10, 2006

Oracle open cursors

OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once

--For current session
select a.value, 
            from v$mystat a, v$statname b 
           where a.statistic# = b.statistic# 
             and = 'opened cursors current', for current session

--For all sessions
select a.sid, a.value,
      from v$sesstat a, v$statname b
     where a.statistic# = b.statistic#
       and = 'opened cursors current'

select a.sid, a.saddr, a.user_name, b.program, count(*)
from v$open_cursor a, v$session b
where a.sid = b.sid
group by a.sid, a.saddr, a.user_name, b.program
order by count(*) 

- No comments Not publicly viewable

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Search this blog

Search Warwick Blogs



Most recent comments

  • Oracle 11g is the clear leader in this area. Oracle has invested heavily into self–tuning capabiliti… by shaane on this entry
  • All the features are very nice.I like Repair Advisors the most.Oracle 10G introduced some of the dat… by lucy on this entry
  • "logical standby failed to re–start, I am also getting the same error. I have search on internet and… by anemia on this entry
  • Thanks for the nice information because from last three days i am stuck on this problem…. by robot vacuum on this entry
  • So what happen City speed dating when you tried this coding once in your PC.. Please tell me so i am… by John Bergeron on this entry
Not signed in
Sign in

Powered by BlogBuilder