oracle打开游标
我们使用的是 ORACLE AS 10g 和 DB 10g (10.0.1)。我们在 AS 上维护一个数据库连接池。我们的应用程序是基于 Web 的。我们正在正确关闭 java 端的结果集和语句。但我们经常收到打开游标超出的错误。目前在生产中我们将限制设置为 5000。 我们使用以下查询来检查当前打开的游标
select a.sid, a.value, b.name, b.statistic#
from v$sesstat a, v$statname b
where a.statistic# = b.statistic#
and b.name = 'opened cursors current'
and a.sid = 555(any sid number)
“打开游标”的计数正在增加,除非我们重新启动应用程序服务器,否则它无法减少。 因为我们正在使用连接池,所以游标没有关闭? 请指导我们应该做什么。我们还会关注哪些其他领域。
We are using the ORACLE A.S 10g and D.B 10g (10.0.1). We maintain a pool of D.B connection on A.S. Our application is web based. We are properly closing the resultset and statement on java side. But we often receive the error open cursor exceeded. Currently on production we set the limit to 5000.
We use following query to check the currently open cursor
select a.sid, a.value, b.name, b.statistic#
from v$sesstat a, v$statname b
where a.statistic# = b.statistic#
and b.name = 'opened cursors current'
and a.sid = 555(any sid number)
The count of ‘open cursor’ is increasing it cannot be reduce until we restart our application server.
Because we are using the connection pooling that is why cursors are not closed?
Please guide us what should we do. What other areas we will look.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查找重复违规者:
存储过程/函数返回的引用游标也需要关闭。
to find repeat offenders:
Ref Cursors that are returned by stored procedures/functions need to be closed too.