aspose file tools*
The moose likes JDBC and the fly likes Open Cursor Exceeded in Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Open Cursor Exceeded in Oracle" Watch "Open Cursor Exceeded in Oracle" New topic
Author

Open Cursor Exceeded in Oracle

Muhammad Ijaz
Ranch Hand

Joined: Mar 03, 2009
Posts: 34
We are using the ORACLE A.S 10g and D.B 10g (10.0.1). We maintain a pool of D.B connection on A.S. Our application is web based. We are properly closing the resultset and statement on java side. But we often receive the error open cursor exceeded. Currently on production we set the limit to 5000.
We use following query to check the currently open cursor



The count of open cursor is increasing it cannot be reduce until we restart our application server.
Because we are using the connection pooling that is why cursors are not closed?
Please advice us what should we do. What other areas should we look.

Thanks

IBM Certified WebSphere Commerce Application Developer

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Do you close all connections in code in a finally block? The connection pool cannot release them otherwise.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Muhammad Ijaz wrote:We are using the ORACLE A.S 10g and D.B 10g (10.0.1). We maintain a pool of D.B connection on A.S. Our application is web based. We are properly closing the resultset and statement on java side. But we often receive the error open cursor exceeded. Currently on production we set the limit to 5000.
We use following query to check the currently open cursor



The count of open cursor is increasing it cannot be reduce until we restart our application server.
Because we are using the connection pooling that is why cursors are not closed?
Please advice us what should we do. What other areas should we look.

Thanks


Your application is leaking resources. Check to make sure you close connections and cursors when you are done with them.
Your query will not show an accurate count of open cursors.
see this for further reading:
http://www.orafaq.com/node/758
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Open Cursor Exceeded in Oracle
 
Similar Threads
implicit open cursors problem
maximumm cursors exceeded
ORA-01000: maximum open cursors exceeded
Need some idea on how to determine the no. of SQL connections that is left open(all across the apln)
open cursors monitoring help required