Need advice on how to close cursors?

Posted on 2014-09-23
Last Modified: 2014-11-16
I have ORA-01000: maximum open cursors exceeded.
Can you please help me with advice/or a script to close the cursors?
Question by:Rao_S
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 13

Accepted Solution

Alexander Eßer [Alex140181] earned 125 total points
ID: 40338755
How do you access the DB?! Via JDBC or ADO...?! A common problem here is NOT closing/disposing the connection properly...
I suppose we do need more background information considering your issue...
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 40338910
I agree with the above post.  It is likely the code isn't properly closing and disposing of connections.

I just wanted to add that it this is in PL/SQL, it is a simple close command:
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 125 total points
ID: 40340700
If you don't have direct control over the application code, your other option is to change the limit for open_cursors in your init*.ora or spfile to a higher value.
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.


Author Comment

ID: 40341465
We are setting up the new 12c OEM.
We have the app server hosting the 12c OMS and backend is single instance oracle database.

Author Comment

ID: 40341508
I did change the limit from 300 to 500 hundred, but i think as suggested above i need to find how the connection to the DB is made and check the code to properly close or dispose of the connections..

Expert Comment

by:Sameer Ahamed Sathar
ID: 40349434
Hi Shobha,

Increasing cursor limits is not a permanent solution.Just check the objects which is making the continuous connection and keep the same open.There you need to add "Close Cursor_name" condition to resolve the issue permanently.

Sameer Sathar
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 40349713
>>Increasing cursor limits is not a permanent solution

It can be a permanent solution.  If it is decided that this is 'normal' behavior for the applications based on the number of users, then you need to tune the database appropriately.
LVL 22

Expert Comment

by:Steve Wales
ID: 40445440
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question