DBAtlas · Database operations atlas

ORA-01000: Maximum open cursors exceeded

Oracle

What does it mean?

A session opened more cursors than allowed by the OPEN_CURSORS parameter. No new cursor can be opened.

Why does it happen?

The application does not close the Statement/ResultSet objects it opens (cursor leak), OPEN_CURSORS is set too low for the workload, or new prepared statements are continually prepared in a loop and never closed.

How to fix it

Monitor open cursors: SELECT * FROM v$open_cursor WHERE sid = ... and see the per-session count via v$sesstat. The real fix is to close every Statement/ResultSet in a finally block in the application (eliminating the cursor leak). As a workaround, increase OPEN_CURSORS: ALTER SYSTEM SET OPEN_CURSORS = 1000. Review the JDBC statement cache size.

Open in DBAtlas →

More from this engine