Menu

ORA-01000: maximum open cursors exceeded

2012-06-20
2013-02-11
  • Josemi Antelo

    Josemi Antelo - 2012-06-20

    Hello,

    I run many times the routine OCI_ExecuteStmt, like:

    CString stm;

    st = OCI_StatementCreate (SGBD);

    if (OCI_ExecuteStmt (st, stm))

    {

    OCI_Resultset *rs;

    CString valor_fila;

    int i, j, n;

    rs = OCI_GetResultset (st);

    n = OCI_GetColumnCount (rs);

    for (i=0; OCI_FetchNext (rs); i++)

    {....}

    }

    OCI_StatementFree (st);

    After several queries, Oracle return me the error "ORA-01000: maximum open
    cursors exceeded"
    What can I do to solve it?

    Many thanks in advance
    Josemi

     
  • Vincent Rogier

    Vincent Rogier - 2012-06-21

    Hi,

    That means that your code is creating more statement at a time that the max
    cursor allowed in the DB (spfile) or that your code does not free all the
    statement you've created...
    Without more information about your code, i cannot say more....

    Regards,

    Vincent

     
  • Josemi Antelo

    Josemi Antelo - 2012-06-21

    Hi Vincet

    You had reason :-(. I've got 2 routines without dispose statement
    (OCI_StatementFree). Now it works fine

    Many, many thanks

    Yours sincerely
    Josemi

     
  • Anonymous

    Anonymous - 2013-02-07

    I am having the same mistake in version 3.11.0. Which version is fixed?

     
  • Vincent Rogier

    Vincent Rogier - 2013-02-07

    About errors ORA-01000, the problem does not reside in OCILIB but in the user code that does not frees statements !

     
  • Anonymous

    Anonymous - 2013-02-11

    You are right Vicent.
    There were in my code createStatements without its delelteStatements.
    Thanks for the answer and for the library

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.