Xref: alice comp.databases.oracle.misc:54242 comp.databases.oracle.server:86132 comp.databases.oracle.tools:40636
Path: alice!news-feed.fnsi.net!news.idt.net!howland.erols.net!newsfeed.cwix.com!cyclone00a-oak.pilot.net!cyclone01-oak.pilot.net!news.beasys.com!not-for-mail
From: Joseph Weinstein <joe@weblogic.com>
Newsgroups: comp.databases.oracle.misc,comp.databases.oracle.server,comp.databases.oracle.tools,comp.lang.java.databases
Subject: Re: Max open cursors
Date: Fri, 03 Mar 2000 14:24:19 -0800
Organization: WebLogic, Inc.
Lines: 53
Message-ID: <38C03B93.DD866462@weblogic.com>
References: <XUVv4.597$3z4.21367@news.uswest.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.beasys.com 952122269 3846 172.17.10.7 (3 Mar 2000 22:24:29 GMT)
X-Complaints-To: newsmaster@beasys.com
NNTP-Posting-Date: 3 Mar 2000 22:24:29 GMT
To: Chad Sheley <csheley@usa.capgemini.com>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en

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 extra-
JDBC 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@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


