We have an application that has been in use for about five years with no problems. The application processes an ever growing table. Today we seemed to have hit a scalability limit The app failed with an ORA-01000 "exceeded maximum open cursors".
After a bit of experimentation I determined that this usage was causing the problem:
ResultSet rs = conn.createStatement().execute("... query here..");
... do something with the result set
rs.close().
And this, seemingly synonymous, usage fixed the problem:
Statement stmt = conn.createStatement() ;
ResultSet rs = stmt.execute("... query here..");
... do something with the result set
stmt.close() ;
The
JDBC driver is the one supplied with Oracle 10g.
The first usage apparently does not close the cursor associated with the result set while the second does.
What gives? I can't find any documenation that explains this and it seems counter-intuitive.
Thanks for any input,
-=beeky