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: Help ! Opened cursors exceed max opened cursors

Re: Help ! Opened cursors exceed max opened cursors

From: <jboakye_at_westcon.com>
Date: 1997/12/12
Message-ID: <881981525.330694670@dejanews.com>#1/1

In article <34917C55.2149_at_bose.com>,
  Joseph Sumalbag <joseph_sumalbag_at_bose.com> wrote:
>
> Hi Vincent,
> This is a common problem , And a DBA's common approach is
> usually just to increase the size of the initialization
> parameter OPEN_CURSORS in the init*.ora file and bounce the
> database .
> SNIP SNIP .........
> > ---------------------------------------------------------------
> > Hi folks,
> >
> > We use Oracle as Database source to store and maintain our data
> > and use Microsoft MFC interface to connect Oracle and fetch data.
> > After we ran our application for about an hour or so, we can not
> > insert or update our data to the database anymore. We trace the
> > problem using SQLGetDiagRec which MFC provides. It showed us that
> > opened cursors exceed max opened cursors. Here is the procedure to
> > retrieve data .
> >
> > 1. get handle using SQLAllocHandle,
> > 2. write a query statement
> > 3. call SQLPrepare to prepare the query statement
> > 4. call SQLExecute to execute query statm
> > 5. Fetch the date using SQLFetch function
> > 6. finally call SQLCloseCursor and SQLFreeStmt with SQL_CLOSE and
> > SQLFreeStmt with SQL_UNBIND.
> >
> > We tested the database and saw the table has new inserted data or
> > updated data there until the cursors error appeared. I understand
> > that the function SQLFreeStmt with SQL_CLOSE and SQL_UNBIND can help
> > us to close cursor that has beeen opened after SQLPrepare is called.
> > Have I misused these database interface which MFC provides?.
> >
> > We will really appreciate if any one can give us any help on this.
> > Thanks in advance.
> >
> >
> > Yan Wang
> > Phasemetrice, Inc.
> >
>
> --
> ================================================================
> ============================
> | Joseph Sumalbag
> |
> | Oracle DBA
> |
> |
> |
> | The opinions expressed above are my own and doesn't

 necessarily                           |

> |reflect the opinion of any of my client company or my employer.
> |
> ================================================================
> ============================

Call SQLFreeStmt with SQL_DROP to kill the cursor (deallocate the cursor) with SQL_CLOSE the cursor is still alive.

Good Luck

Joseph Boakye
<jboakye_at_westcon.com>

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Fri Dec 12 1997 - 00:00:00 CST

Original text of this message

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