Re: Max open cursors

From: Joseph Weinstein <joe_at_weblogic.com>
Date: Fri, 03 Mar 2000 14:24:19 -0800
Message-ID: <38C03B93.DD866462_at_weblogic.com>


Make sure you close every resultset when you're done with it, and every statement. That'll do it. By rights, closing the statement should do it, but there's a hole in the Oracle drivers from Oracle that I've tested, having to do with their extension to JDBC to allow obtaining result sets from output parameters of CallableStatements. In the normal JDBC way, a statement can only have one outstanding result set object at a time, and when the statement is either used to obtain a second result set, or closed, the spec says the preceding resultset will be automatically closed. However, with the Oracle extension, a client can have any number of simultaneous resultsets from a given CallableStatement, and the bug is that closing the Statement does not automatically close all those extraJDBC  result sets.
Joe Weinstein at BEA

Chad Sheley wrote:

> I'm wondering how far I can increase the OPEN_CURSORS parameter on my Oracle
> 8.05 database until some different problem comes up besides "Max Open
> Cursors Exceeded"?
>
> I have a Java class that is reading some records from a file, doing some
> validation and then calling a series of stored procedures to insert the data
> into 4 tables.
>
> I've had the same problem on other similar processes and just kept
> incrementing the OPEN_CURSORS parameter to the current setting of 5000.
>
> I'm not even real sure if 5000 is some incredibly excessive number!
>
> I should also mention that we've added COMMITs in the Java code at various
> places to try and circumvent the problem, to no avail. Am I missing
> something here too? I thought a COMMIT would release the cursor resources.
>
> Is there anything else to try for this situation, or should I just keepin
> incrementing OPEN_CURSORS?
>
> Chad Sheley
> Senior Consultant
> Cap Gemini
> Des Moines, IA

--

PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positions for
people who want to work with Java and E-Commerce infrastructure products. Send
resumes to joe_at_beasys.com
--------------------------------------------------------------------------------
                    The Weblogic Application Server from BEA
         JavaWorld Editor's Choice Award: Best Web Application Server
  Java Developer's Journal Editor's Choice Award: Best Web Application Server
     Crossroads A-List Award: Rapid Application Development Tools for Java
Intelligent Enterprise RealWare: Best Application Using a Component Architecture
               http://weblogic.beasys.com/press/awards/index.htm
Received on Fri Mar 03 2000 - 23:24:19 CET

Original text of this message