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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01000: maximum open cursors exceeded

Re: ORA-01000: maximum open cursors exceeded

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 22 Aug 1998 17:10:06 +0200
Message-ID: <35DEDF4C.B5A11374@sybrandb.demon.nl>


Mattias,

Every sql statement uses a separate cursor. This simply means you have run out of cursors. The default of 50 is usually not sufficient. You will need to edit your init<sid>.ora and either include a line 'open_cursors = 100' (without quotes of course) or change the line if it's already there. If you have done that, bounce the database (shutdown and startup). That should resolve it.
Final note: there is a select statement without cursor in your code. An implicit cursor will be created in this case. If you can avoid implicit cursors. It looks like they are not released after being closed. You probably need to increase open_cursors anyway.

Hope this helps,

Sybrand Bakker

Mattias Malmgren wrote:

> I have a loop that asks for texts created at a date. After 3 texts has
> bean fetched from the database I get this error
>
> ORA-01000: maximum open cursors exceeded
>
> But just before I test :
>
> ...
> IF get_all%ISOPEN
> THEN
> CLOSE get_all;
> END IF;
>
> OPEN get_all FOR
> SELECT text FROM documents WHERE date = 12;
> RETURN get_all;
> END;
>
> Anyone have any ideas?
>
> Greeting Mattias Malmgren
Received on Sat Aug 22 1998 - 10:10:06 CDT

Original text of this message

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