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

Home -> Community -> Usenet -> c.d.o.misc -> Maximum open cursors

Maximum open cursors

From: Alon Gilad <alon_at_rts.co.il>
Date: 1997/09/15
Message-ID: <341D4FB0.3F4@rts.co.il>#1/1

Hello to all ,

I'm running an application that interfaces Oracle using OCI. From time to time I get the "MAX open Cursors" error. When looking at the number of open cursors my application has open I see that even though I close a cursor Oracle does not release the links to the cursor.

To check the number of open cursors I run:

   select c.sid, substr(s.osuser,1,15) "user", s.process,

         substr(s.machine,1,15) machine, count(*)
      from v$open_cursor c, v$session s
      where c.sid = s.sid
      group by c.sid, substr(s.osuser,1,15),
          s.process, substr(s.machine,1,15)
      order by count(*)

Oracle support said that in Pro C there are two parameters that determine if Oracle releases the cursors or not : RELEASE_CURSOR, HOLD_CURSOR . HOLD_CURSOR by default is NO. This means that after Oracle executes a SQL
statement the links to the cursor cache, memory, and parse locks are released
and marked for reuse.  

RELEASE_CURSOR by default is NO. This means that after Oracle executes a SQL
statement, the links to the cursor cache is maintained and not released.

As for OCI they said all I can play with is the "OPEN_CURSORS" parameter in the Oracle ini file. Does anybody know of any way to affect Oracle behavior at the application level ?  

Alon Received on Mon Sep 15 1997 - 00:00:00 CDT

Original text of this message

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