Oracle非活动连接 [英] Oracle inactive connection

查看:236
本文介绍了Oracle非活动连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的oracle服务器中有很多不活动的连接.我从那些非活动状态检索SQL文本. SQL测试是

There are a lot of inactive connection in my oracle server. I retrieve SQL text from those inactive. The SQL test is

SELECT PARAMETER, VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET')

但是我从未在系统中使用过SQL语句,也不知道为什么该语句在不自动关闭的情况下自动运行.

but I never use the SQL statement in my system, and do not know why the statement run automatically without closing automatically.

推荐答案

有问题吗?在大多数系统中,大多数会话在大多数时间都是不活动的.不活动的会话仅表示在您查询数据字典的那一刻,没有执行SQL语句.无论是在谈论客户端服务器应用程序还是在中间层具有连接池的三层应用程序,大多数时候,您都在等待应用程序处理某些数据或等待用户做出决定.在此期间,数据库会话将处于非活动状态.

Is there a problem? In most systems, most sessions are inactive the vast majority of the time. An inactive session merely indicates that at the instant you queried the data dictionary, a SQL statement was not being executed. Whether you are talking about a client-server application or a three tier application where the middle tier has a pool of connections, most of the time, you're waiting either for the application to process some data or for the user to make a decision. During that time, the database session will be inactive.

对于您所看到的查询,我强烈建议这只是一个查询,无论您使用的是哪种数据库驱动程序/框架(您的ODBC驱动程序,OLE DB驱动程序,ODP.Net提供程序等)都可以执行打开连接或将其返回到中间层连接池时.

As for the query you're seeing, I would strongly wager that this is simply a query that whatever database driver/ framework you are using (your ODBC driver, OLE DB driver, ODP.Net provider, etc.) executes either when a connection is opened or when it is returned to a middle tier connection pool.

这篇关于Oracle非活动连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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