ORACLE / ASP.NET:ORA-2020 - 太多的数据库链接......是什么造成的? [英] ORACLE/ASP.NET: ORA-2020 - Too many database links... what's causing this?

查看:193
本文介绍了ORACLE / ASP.NET:ORA-2020 - 太多的数据库链接......是什么造成的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的情景......

我们有正在运行最新版本的ODAC(Oracle客户端)的内部网站。它打开数据库连接,运行存储过程或包装的方法,然后断开连接。连接池被打开,我们目前在我们两个开发和测试环境的版本11g中,但10gR2中下我们的生产环境。这发生在生产。

日前,这个过程开始射击了一个ORA-2020错误。该过程是从我们的内部网站的网页调用。用户只需设置一个日期,点击一个按钮,一个作业开始另一个系统,该系统是从网站分开上。调用本身,但是,使用数据库链接,运行的函数。

我们已经冲刷了SQL发现它仅使用一个数据库链接。而且,由于这些链接是在每个会话的基础上,用户不超过4默认限制,怎么可能,我们得到一个ORA-2020错误。

我们已经跑了多项测试,试图推倒4. ODAC的默认限制,从我记得,每次运行连接后提交,而我似乎无法运行4 DB连接,然后运行任何错误后一块1 DB直接连接的SQL。我提出这个错误的唯一方法是,如果我运行4 DB链接,则功能或用一块在它的数据库链接的动态SQL查询。因为这个问题是零星的,我们没有这样的问题。它并不总是发生。

问题


    如果用户B运行的SQL语句与更多的数据库链接
  1. 有没有可能是连接池是允许用户B使用用户A的连接的初始过程后运行,从而增加了打开链接多少?

  2. 这是一种情况,就要了我们的极限过去4?什么是增加数量的缺点是什么?

  3. 请我需要从数据库断开连接之前显式关闭打开的数据库链接? Oracle文档似乎表明它应该自动发生,但偶尔......没有。


解决方案

我们结束了越来越多的链接数量,但我​​们从来没有找到问题的根源。

Here's the scenario...

We have an internal website that is running the latest version of the ODAC (Oracle Client). It opens database connections, runs a stored procedure or packaged method, then disconnects. Connection pooling is turned on, and we are currently under version 11g in both our development and test environments, but under 10gR2 in our production environment. This happens on Production.

A few days ago, a process began firing off a ORA-2020 error. The process is called from a webpage on our internal website. The user simply sets a date, hits a button, and a job is started on another system that is separate from the website. The call itself, however, uses a database link to run a function.

We've scoured the SQL to find that it only uses that one database link. And since these links are on a per session basis and the user isn't exceeding the default limit of 4, how is it possible that we are getting a ORA-2020 error.

We have ran a number of tests to try to push over the default limit of 4. ODAC, from what I recall, runs a commit after each connection, and I can't seem to run 4 DB links, then run a piece of SQL with 1 DB link directly after with any errors. The only way I can bring up this error is if I run a query with 4 DB links, then a function or piece of dynamic SQL with a database link within it. We don't have that problem as this issue is sporadic. It isn't ALWAYS happening.

Questions

  1. Is it possible that connection pooling is allowing User B to use User A's connection after the initial process was run, thus adding to the open links number if User B runs a SQL statement with more database links?
  2. Is this a scenario where we should up our limit past 4? What are the disadvantages of increasing the number?
  3. Do I need to explicitly close open database links before disconnecting from the database? Oracle documentation seems to suggest it should automatically happen, but "on occasion"... doesn't.

解决方案

We ended up increasing the link amount, but we never did find the root cause.

这篇关于ORACLE / ASP.NET:ORA-2020 - 太多的数据库链接......是什么造成的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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