ORA-01000:在asp.net中超过了打开游标的最大数量 [英] ORA-01000: maximum open cursors exceeded in asp.net

查看:82
本文介绍了ORA-01000:在asp.net中超过了打开游标的最大数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要面对

ORA-01000:超出了打开游标的最大数量

ORA-01000: maximum open cursors exceeded

在IIS上托管ASP网页后.当我使用Visual Studio测试网页时.超过最大打开游标数的问题不会发生.

After hosting an ASP web page on IIS. When I test the web page with visual studio. The maximum open cursors exceeded problem does not happen.

  1. 问题发生的原因是什么&我该如何解决
  2. 当我关闭并取消Oracle连接时,打开的游标会自动关闭吗?如果没有,我该如何关闭它们?

我用来关闭&取消连接

Code I use to close & displose the connection

rdr.Close()
rdr.Dispose()
cmd.Connection.Close()
cmd.Connection.Dispose()
For Each para As OracleParameter In cmd.Parameters
    para.Dispose()
Next
cmd.Dispose()
con.Close()
con.Dispose()

我的用法正确吗?

推荐答案

根据您对其他答案的回答,您的问题很可能是IIS Web服务器正在使用连接池进行数据库连接.连接池将创建许多连接,并且从数据库角度来看,可以长时间保持打开状态.这样做是因为要进行的假设是打开数据库连接,这相对于显示页面的持续时间是很耗时的.

Based upon you responses to the other answers, your problem is most likely the IIS web server is using a connection pool for your database connection. A connection pool will create a number of connections and, from the database perspective, keep them open for a long time. It does this because the assumption being made is opening a database connection is time consuming in relation to the duration of displaying a page.

您需要检查IIS的配置并禁用连接池(不推荐),或者减小连接池的大小.

You need to review the configuration of the IIS and either disable the connection pool (not recommended), or make the pool size smaller.

这篇关于ORA-01000:在asp.net中超过了打开游标的最大数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆