Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get the REAL open cursors?
go to asktom.oracle.com
type "open cursor" in the search field
"Richard Kuhler" <noone_at_nowhere.com> wrote in message
news:nUpda.28950$0r1.5962722_at_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 Tue Mar 18 2003 - 06:39:30 CST