java.sql.SQLException: - ORA-01000: maximum open cursors exceeded

后端 未结 13 1631
鱼传尺愫
鱼传尺愫 2020-11-22 08:36

I am getting an ORA-01000 SQL exception. So I have some queries related to it.

  1. Are maximum open cursors exactly related to number of JDBC connections, or are t
13条回答
  •  梦如初夏
    2020-11-22 08:59

    I too had faced this issue.The below exception used to come

    java.sql.SQLException: - ORA-01000: maximum open cursors exceeded
    

    I was using Spring Framework with Spring JDBC for dao layer.

    My application used to leak cursors somehow and after few minutes or so, It used to give me this exception.

    After a lot of thorough debugging and analysis, I found that there was the problem with the Indexing, Primary Key and Unique Constraints in one of the Table being used in the Query i was executing.

    My application was trying to update the Columns which were mistakenly Indexed. So, whenever my application was hitting the update query on the indexed columns, The database was trying to do the reindexing based on the updated values. It was leaking the cursors.

    I was able to solve the problem by doing Proper Indexing on the columns which were used to search in the query and applying appropriate constraints wherever required.

提交回复
热议问题