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: Cursors consumed to fast :-(

Re: Cursors consumed to fast :-(

From: H. v. Vroonhoven <hvroon_at_doge.nl>
Date: 1997/03/12
Message-ID: <332715b6.3088335@news.doge.nl>#1/1

On Wed, 12 Mar 97 18:45:25 +0100, ms_at_dream.hb.north.de (Martin Schroeder) wrote:

>Hi,
>I have constructed a PL/SQL program consisting of some PL/SQL packages that
>uses implicit cursors and explicit cursors from DBMS_SQL. Mostly the cursors
>are used implicitely via Loops; at the places where the cursors are used
>explicitely (via DBMS_SQL) they are closed after use.
>The program currently does no COMMIT; it ROLLBACKs in case of errors.
>
>I call the program/routines via execute statements from SQL*Plus.
>
>But I frequently get the ORA-01000 error -- maximum number of open cursors
>exceeded. OPEN_CURSOR is set to 50.
>
>When I examine the cursors via v$open_cursor I find indeed many cursors (e.g.
>from triggers); but these remain even after an explicit COMMIT or ROLLBACK. :-((
>
>I am quite sure that I close all cursors the program knows of...
>
>Anybody got a clue for me?
>
>Thanks in advance
> Martin
>
>--
> Martin Schr"oder, MS_at_Dream.HB.North.DE
>There are two ways of constructing a software design: One way is to make
>it so simple that there are obviously no deficiencies, and the other way
>is to make it so complicated that there are no obvious deficiencies. The
>first method is far more difficult. (C. A. R. Hoare)

You'll have to know that implicit stay open. You only close the explicit defined cursors. Only use explicit cursors because they also make only one select to the database. Implicit cursors make two select to the database. Received on Wed Mar 12 1997 - 00:00:00 CST

Original text of this message

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