DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: how to find out whether a cursor has been closed

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75

    how to find out whether a cursor has been closed

    Hi, all
    I'd like to find out if there are any open_cursors not being closed as of now by viewing data dictionary tables or views. I tried v$sysstat and v$open_cursors without any help. They only show the cursors opened and closed accumulatively.
    Any help would be appreciated.

    DF
    Still learning

  2. #2
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530

    Re: how to find out whether a cursor has been closed

    Hi,
    The cursors listed in V$OPEN_CURSORS are,in fact, still open.This is a performance optimization method used by the server.Even though you have CLOSED the cursors, they are still cached in Server memory. This is not a bug. The code leaves cursors open and caches them, as intended.The CLOSE_CACHED_OPEN_CURSORS parameter in init.ora forces all of these cached cursors to be closed at the end of each transaction,if that is desired.This parameter is obsolete in Oracle versions 8i and above.

    Regards,
    Rohit Nirkhe,Oracle/Apps DBA,OCP 8i,9i
    oracle-support@indiatimes.com
    Thanks and Regards
    Rohit S Nirkhe
    rohitsnirkhe@rediffmail.com

  3. #3
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75
    Thanks for replying.
    My developers ask me if I can find the unclosed cursors for them. I told them to go through their codes. But I still want to know if there is any way to find out in oracle if there is any open cursors which should have been closed but still open. Thanks anyway.

    D.F.
    Still learning

  4. #4
    Join Date
    Oct 2002
    Posts
    182
    I fyou know what cursors you are looking for:

    c1%ISOPEN
    - Cookies

  5. #5
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    Not feasible YOU find the cursors mistakenly left open (to be true, this is a bug, and bug removal MUST be left to programmers), BUT you can get the truely number of current open cursors with the statistic of opened cursors current , as showed in http://asktom.oracle.com/pls/ask/f?p...D:553222846752 , hence identifying the cursor leaking programs, BUT the programmers WILL need open, find & correct the bug.

    Regards,

    Chiappa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width