暂无图片
Oracle报错:ORA-01000 : 超出打开游标的最大数
我来答
分享
暂无图片 匿名用户
Oracle报错:ORA-01000 : 超出打开游标的最大数

微信图片_20211228150836.png

我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
摸摸鱼

同楼上,也可以参考

Typically, in Java, when an object goes out of scope, it is automatically garbage collected, but the Java specification does not place any specific requirements on the JVM regarding when (or even if) this will occur for any particular object. Therefore, do not rely on finalizers to close your cursors.

Explicitly close all cursors by either using ResultSet.close(), Statement.close(), and/or PreparedStatement.close() when you no longer need the cursor. This ensures that the corresponding server-side cursors are closed, preventing the ORA-1000 error. Be sure to close these JDBC objects within the scope that they were created. Closing these objects in a finally{} block is recommended, however, DO NOT rely upon a finalize() method because a finalize() method is never guaranteed to run by the JVM!

A common error occurs when CallableStatement is used to call a PL/SQL procedure that returns a REF CURSOR. If you do not close the corresponding ResultSet object, a cursor will be left open on the server.

You can query the SQL_TEXT column in V$OPEN_CURSOR view from the schema to determine which cursors are not being closed. For example:

SQL> select sql_text from v$open_cursor;
暂无图片 评论
暂无图片 有用 0
打赏 0
暂无图片
cqiwen

存储过程中打开游标后没有进行关闭吗?或者尝试调大open_cursors的值。

暂无图片 评论
暂无图片 有用 0
打赏 0
回答交流
Markdown


请输入正文
提交
相关推荐
win2019 server安装Oracle19c,双击setup后一直停在这里不动?
回答 5
谢谢各位大神,已经解决了,客户才装的操作系统,做了很多安全策略,他也不记得整了些啥了,重装操作系统后就正常了。
一个长时间关闭的Data Guard从库,现在要重新运行起来,需要怎样操作,有什么注意点?
回答 2
已采纳
adg会接收主库相差的归档日志,并应用归档,保持实时同步。需要确定主库的归档清理规则如:主库归档保留7天,并使用force命令强制删除归档,而adg库14天就停了,那就会导致,缺失归档,这可以使用增量
异地DG正常出现 archive log lock是网络异常引起的?
回答 4
暂无文字回复
oracle数据泵导入index很慢是为什么?
回答 5
impdp导入时创建索引没有使用并行,因此非常慢。建议导入数据时排除索引excludeindex,然后使用impdpincludeindexsqlfile选项生成创建索引的sql,vi批量修改sql里
oracle insert 慢:db file sequential read 等待事件
回答 1
已采纳
UPDATEINDEXES选项将导致局部索引的重建。如果索引很大,这个过程可能会很慢,并且如果在INSERT操作同时进行时,它可能会与INSERT操作竞争I/O资源。TRUNCATE操作会重置分区的高
Oracle 查询条件里字段顺序一定要和索引相一致才调用索引么
回答 1
已采纳
这个“据说”是非常不靠谱的, 即便退回到20多年前的8版本,优化模式使用RBO, 字段顺序在where条件里面也是随便写的,都是能够正常使用索引的。
Oracle的配置文件修改,提前复制后,直接放入当前的目录,会影响Oracle的运行吗?
回答 1
不会的,这些都是静态文件
请教各位大神,最近业务反馈卡顿,可疑时间段的等待事件log file sync和enq: TM - contention
回答 4
看下AWR报告里面的topsql
Oracle 12c,装rac怎么提示主目录不为空,如何处理?
回答 1
看看安装目录有什么东西,清理了就行了。
Oracle查询的字段里有单引号
回答 7
对整串文本的单引号转义用q&x27;{字符串内容}&x27;此例表示临时性的,把用于字符串定义的单引号,替换成"{"。其中第一个单引号后面的符号"{",可以用其