Home >Database >Mysql Tutorial >Oracle ORA-01000:maximum open cursors exceeded

Oracle ORA-01000:maximum open cursors exceeded

WBOY
WBOYOriginal
2016-06-07 17:25:151220browse

Oracle ORA-01000:maximum open cursors exceeded中文错误ldquo;超出打开游标的最大数rdquo;。这个错误通常都是由于在程序代码

Oracle ORA-01000:maximum open cursors exceeded中文错误“超出打开游标的最大数”。
这个错误通常都是由于在程序代码中循环体内放入了statement或preparestatement,而每一个循环结束时并未及时关闭statement或preparestatement。解决方法就是循环体内用完resultset、statement或preparestatement之后,立即执行close()。
 
同时还应考虑扩大数据库服务器的open_cursors的值,
先得到系统默认的游标最大值,
select value from v$parameter where name = 'open_cursors';
(或show parameter open_cursors)
使用下面语句更改即可:
alter system set open_cursors=5000 scope=both。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn