1

I have an error whick is ORA-01000 maximum open cursor exceeded and I want to close these open cursors. I have already fix the cause and restarted java server but problem still occurs.

I read in some question on the forum, they mentioned about restarting oracle server. Here is the question. I have 2 environment which look the same database. I have this problem in environment 1 only. Therefore I thought that restarting oracle is not necessary and I restarted my java server 1. But i have still same problem.

Do you know how can I close all opened cursor?

user1474111
  • 1,356
  • 3
  • 23
  • 47
  • I think you will find your answer here http://stackoverflow.com/questions/12192592/java-sql-sqlexception-ora-01000-maximum-open-cursors-exceeded – Lalit Kumar B Apr 10 '15 at 13:28

2 Answers2

2

The problem is that an open cursor stay opened up to when the session is not closed. You can try to kill the sessions (oracle sessions) related to your java application.

Davide Lorenzo MARINO
  • 26,420
  • 4
  • 39
  • 56
0

It appears you have a resource leak. You need to make sure to close your JDBC ResultSets and Staements when they are no longer needed.

Additionally it is good practice to use a connection pool, because having too many of them opened may cause this error too.

Oracle allows you to kill sessions manually, otherwise you will need to wait for them to time out.

Palcente
  • 625
  • 2
  • 7
  • 21