Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Need advice on how to close cursors?

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
Rao_S
Asked:
Rao_S
4 Solutions
 
Alexander Eßer [Alex140181]Software DeveloperCommented:
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
 
slightwv (䄆 Netminder) Commented:
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
 
Mark GeerlingsDatabase AdministratorCommented:
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
Rao_SAuthor Commented:
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
 
Rao_SAuthor Commented:
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
 
Sameer Ahamed SatharSystem EngineerCommented:
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
 
slightwv (䄆 Netminder) Commented:
>>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
 
Steve WalesSenior Database AdministratorCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now