今天在项目开发中,发现数据库连接数过多,Oracle中存在很多超时连接。导致新增客户端无法连接到数据库。所以设置了强制释放oracle连接属性。在网上查询了设置说明如下:sqlplus /nolog
打开sqlplus
connect system/bianqiwei@orcltns as sysdba
使用具有dba权限得用户登陆oracle
show parameter resource_limit
显示资源限定是否开启,value为true是开启,为false是关闭
alter system set resource_limit=true
如果未开启,则使用此命令开启资源限定功能
create profile profileName limit connect_time 60 idle_time 30
创建profile文件,profileName任意起,connect_time设置连接超过多少分钟后强制释放,idle_time设置连续不活动的会话超过多少分钟后强制释放
alter user oracleUser profile profileName
将profile文件作用于指定用户 【LINUX公社 www.LinuxIDC.com 】在数据库中的实际操作如下:Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@nsn-db-server ~]$ sqlplus "/ as sysdba"SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 22 16:14:11 2009Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining optionsSQL> show parameter resourceNAME TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
resource_limit boolean
FALSE
resource_manager_plan stringSQL> alter system set resource_limit=true;System altered.SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
2
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30
2
SQL>
SQL> create profile sbaplimit20091222 limit connect_time 60 idle_time 30;Profile created.SQL> alter user sbap profile sbaplimit20091222_;User altered.SQL> exitOracle数据库中查询连接数的实用sql语句Linux 系统下MySQL连接的套接字出错问题解决相关资讯 oracle
- [INS-32052] Oracle基目录和Oracle (07/22/2014 07:41:41)
- Oracle 4个大对象(lobs)数据类型 (02/03/2013 12:33:05)
- Oracle按时间段分组统计 (07/26/2012 10:36:48)
| - [Oracle] dbms_metadata.get_ddl的 (07/12/2013 07:37:30)
- Liferay Portal 配置使用Oracle和 (07/31/2012 20:07:18)
- Concurrent Request:Inactive (07/20/2012 07:44:05)
|
本文评论 查看全部评论 (0)