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 -> Re: OpenCursors - ORA-1000

Re: OpenCursors - ORA-1000

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 20 Aug 1999 12:18:02 GMT
Message-ID: <37c1471f.350362043@newshost.us.oracle.com>


A copy of this was sent to Tom Kunetz <thomas.kunetz_at_cs.tcd.ie> (if that email address didn't require changing) On Fri, 20 Aug 1999 11:43:10 +0100, you wrote:

>Hi
>
>I have a java server which requests an Oracle database. Sometimes I have
>this Error:
> java.sql.SQLException: ORA-01000: maximum open cursors exceeded
>but I close all the statements and resultsets.
>
>Does anyone knows how to retrieve the actual number of Open Cursors. In
>the documentation the maximum is 50 but I would like to be able to
>retrieve this number dynamically.
>
>Thanks for your help.
>Tom.

you can select that value from v$parameter.

it is settable in the init.ora. I set mine to about 1000 for example.

You most likely are missing some cursors (letting them go out of scope, closing the result set but not the statement and so on). to find these, dump the v$open_cursor table for your session evernow and then from another session (select sql_text from v$open_cursor where user_name = 'YOUR APPS USERNAME' for example) and track down the queries that are really not being closed.

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Aug 20 1999 - 07:18:02 CDT

Original text of this message

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