| Author |
Q about JDBC driver classes: how many open cursors
|
Gian Franco
blacksmith
Ranch Hand
Joined: Dec 16, 2003
Posts: 975
|
|
Hi, Is there a way to find out how many open database cursors there are with the JDBC driver classes? I need this info to investigate the cause of an Oracle problem regarding the use of too many cursors. Cheers, Gian Franco
|
"Eppur si muove!"
|
 |
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
|
|
There isn't. But I can tell you what your cursor problem is - been there, done that, got the tar and feathers - it's a resource leak. Somewhere in your code (or a library you use) JDBC Statement objects are not being closed. The Oracle driver does not seem to clean up unclosed statements; maybe the Connection keeps a reference to them, or they don't have a finalize method. If you are using a connection pool this means the Statement, and all its open result sets, stays around forever. Eventually you will run out of cursors. Be religious about closing all your statements and connections in a finally clause. - Peter
|
 |
 |
|
|
subject: Q about JDBC driver classes: how many open cursors
|
|
|