Results 1 to 6 of 6

Thread: Open cursors

  1. #1
    Join Date
    Aug 2003
    Posts
    41

    Unanswered: Open cursors

    Hi Guys,

    I'm getting an Open Cursor exeeded error while running one of our web enabled application. The ASP is running some SQLs to display some pages. I increased the OPEN_CURSORS to 500, but still the error persists. platform: Oracle 817 on windows. I did some metalink search, but not very useful info to me. Any guidelines to address this issue?

    thanks,
    Sunil

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: Open cursors

    Is your code closing all cursors when its done?

    We had a problem back on 8.1 where the For Cursor Loop would fail to close the cursor after completion resulted in exceeding max cursors. We ended up re-writing the code with Open - Fetch - Loop.

    Try checking your open cursors during execution to determine what is leaving your cursors open.

    HIH

  3. #3
    Join Date
    Jan 2004
    Posts
    99
    I agree with the above reply, make sure you close the cursors when finished using in code...from experiance I have seen many oracle datbases with open_cursors set to 800 and above...as a fix/hack.

  4. #4
    Join Date
    Aug 2003
    Posts
    41
    thanks guys.

  5. #5
    Join Date
    Dec 2003
    Location
    Noida, India.
    Posts
    171
    - Also, when you open multiple cursors with the same name, remember to close each one after opening next one. Else it opens a new cursor, and leaves the previous cursor open.
    - Also, close all open cursors in exception handler.
    - Its safe to use a for loop to open cursor, as against a open ... fectch .. close.
    Oracle can do wonders !

  6. #6
    Join Date
    Aug 2003
    Posts
    41
    Have anyone been using Javascript? These cursors are Javascript recordsets and it seems to be closing after retrieving the required records. But for some reason, the open_cursor exeeded error reappears indicating the cursors have not been closed. If anyone is used with Javascript, i can put a snippet of the code here.

Posting Permissions

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