Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Rogue Cursors in Oracle

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are calling a variety of Stored procedures from a servlet running on WebLogic. We are periodically receiving Max cursor open errors during our testing, even though we are the only client accessing the server. We have placed all of the relevant close calls (ResultSets, Statements and Connnections) in finally clauses for the relevant methods and we are sure they are being closed. We have looked in our WLS connection pool and there are no open connections after our close calls have been made. However, if we interrogate the database for open cursors, we see all of our calls still active. Does anyone have any suggestions regarding next steps.
Thanks in advance!!!
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Search for all statements and resultsets and make sure they all get closed!
After you have made sure that #1 isn't the culprit, Oracle has some internal problems with prepared statements. On some occasions, even though you close the resultset and prepared statements, the cursors remain open. Soon you will get "Ora-1000 max number of cursors exceeded" or something to that effect. There are 3 workarounds:
2. set max number of open cursors in Oracle to a high number (at least 200... the default is 40ish) as this does not effect performance of the DB.
3. force a rollback: connection.rollback()
4. close the connection: connection.close()
hope this helps
NOTE: try updating your jdbc drivers to the latest ( and most bug free ) drivers possible.
[ July 30, 2002: Message edited by: Jamie Robertson ]
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic