ORA-01000 SQL Origin: Data OSI layer 7 · Application Last updated 18 Nov 2026

ORA-01000: maximum open cursors exceeded

A session opened more cursors than OPEN_CURSORS allows, almost always because statements/result sets aren't closed.

Exact message you may see ORA-01000: maximum open cursors exceededmaximum open cursors exceeded Oracle JDBCjava.sql.SQLException: ORA-01000OPEN_CURSORS exceeded
Seen on: Oracle Java

Meaning

It is nearly always an application leak: close ResultSet, Statement and PreparedStatement (try-with-resources), avoid creating statements in loops without closing, and fix ref cursors. Raise OPEN_CURSORS only after fixing the leak. Check v$open_cursor.

Common causes

  • Statements/ResultSets not closed
  • Prepared statements created in a loop
  • Ref cursors never closed
  • OPEN_CURSORS too low
  • Connection pool caching too many statements

⚡ Quick fix

  1. Close resources (try-with-resources / finally)
  2. Find leaks: SELECT sql_text, COUNT(*) FROM v$open_cursor GROUP BY sql_text ORDER BY 2 DESC
  3. Then raise OPEN_CURSORS

Detailed fix by platform

SQL

  1. SELECT a.value, s.sid, s.username FROM v$sesstat a, v$statname b, v$session s WHERE a.statistic#=b.statistic# AND s.sid=a.sid AND b.name='opened cursors current' ORDER BY a.value DESC;

How to diagnose

  1. Open cursors — Growing?
  2. Close — Missing?
  3. OPEN_CURSORS — Value?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

ORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-00018 — ORA-00018: maximum number of sessions exceeded (SQL)ORA-00018ORA-00020 — ORA-00020: maximum number of processes (150) exceeded (SQL)ORA-00020ORA-00028 — ORA-00028: your session has been killed (SQL)ORA-00028ORA-00054 — ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired (SQL)ORA-00054ORA-04031 — ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool", ...) (SQL)ORA-04031ORA-06512 — ORA-06512: at "SCHEMA.PROC", line N (SQL)ORA-06512pool timeout — Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. All pooled connections were in use and max pool size was reached. (SQL)pool timeoutORA-01000

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.