Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to get the REAL open cursors?

How to get the REAL open cursors?

From: Richard Kuhler <noone_at_nowhere.com>
Date: Mon, 17 Mar 2003 20:05:39 GMT
Message-ID: <nUpda.28950$0r1.5962722@twister.socal.rr.com>


Given that V$OPEN_CURSOR shows cursors that are closed but being cached, how can you get a list of the really open cursors?

I see the V$SQL_CURSOR system view which looks promising but I'm uncertain how to join it with V$OPEN_CURSOR and how to interpret the STATUS and INST_FLAG columns (don't see anything usefull in the "Database Reference" descriptions). Here's my wild ass guess at the guery ...

select sql_text, status
from v$open_cursor, v$sql_cursor
where v$open_cursor.address = v$sql_cursor.parent_handle

    and sid = (select sid from v$mystat where rownum = 1) /

The cursors that were cached but actually closed had a status of 'CURBOUND' but I'm not sure it that's good enough to tell.

Any ideas on how to do this?

Thanks,
Richard Kuhler Received on Mon Mar 17 2003 - 14:05:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US