Solved

Need advice on how to close cursors?

Posted on 2014-09-23
9
192 Views
Last Modified: 2014-11-16
Hello,
I have ORA-01000: maximum open cursors exceeded.
Can you please help me with advice/or a script to close the cursors?
Regards,
Shobha.
0
Comment
Question by:Rao_S
[X]
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
9 Comments
 
LVL 13

Accepted Solution

by:
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...
0
 
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:
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/close_statement.htm#i32987
0
 
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rao_S
ID: 40341465
Hello,
We are setting up the new 12c OEM.
We have the app server hosting the 12c OMS and backend is single instance oracle database.
Regards,
Shobha
0
 

Author Comment

by:Rao_S
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..
0
 
LVL 1

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.

Thanks,
Sameer Sathar
0
 
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.
0
 
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.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

707 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