Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    South Africa

    Unhappy Unanswered: Ora-01000 Maximum open cursors exceeded


    I am using Delphi 7 and Oracle 8.1.7. I am getting the above mentioned
    error. I know I can change the open_cursors parameter in my init.ora file.
    Which I have done, to 7500. And I am still getting the problem. So I guess
    I must go and have a look at my delphi application. What I don't
    understand is what do they mean by cursors in terms of delphi ? Is that
    the amount of table and query components that are open ? If that is the
    case, then I still don't understand what the problem is, because I do
    close all my queries and tables. I have already run the following query :

    select user_name, status, osuser, machine, a.sql_text
    from v$session b,
    v$open_cursor a
    where a.sid = b.sid

    And according to that the cursor/statement that occurs the most is
    an insert into a table. So ...... what must I do about that ? I use a
    table component to insert the records and the insert is in a loop. So
    must I open and close the table the whole time ? Put a db.starttransaction
    before the insert and a db.commit after the insert ? I have done all of
    these and it does not work. I am clearly missing something, but got no
    idea what.

    If anybody have an explanation, please explain like I am a 5 year old kid,
    because I have read alot of forums about this subject already and I am
    still not getting it.


  2. #2
    Join Date
    Oct 2002
    You must close a cursor every time you open one. 99.9 times out of 100 this is a cursor in a loop that keeps getting opened and never gets closed.

  3. #3
    Join Date
    Jul 2003
    Sometimes this can be attributed to jobs with cursors running that do not finish for a specific reason (still in their loop/cursor). MEANWHILE the job gets run again.

    ie: my job runs every 30 seconds, but there was an error in my code which makes it loop forever. each job keeps adding another open cursor.

    As mentioned above, this is basically an indication that some of your cursors are not closing or were never coded to close after they are opened.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Feb 2003

    Thumbs up Max Cursors Exceeded

    Yep we had a similar issue with a VB client app and Oracle 817.

    In the end we spotted that in the Oracle ODBC Driver Dataset config there is
    an option to "Enable Closing Cursors". If this is NOT ticked then you'll get this
    problem of exceeding Max Cursors.

    Give it a whirl and see if this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts