Home  >  Article  >  Database  >  ORA-02396: exceeded maximum idle time, please connect again的

ORA-02396: exceeded maximum idle time, please connect again的

WBOY
WBOYOriginal
2016-06-07 17:32:351465browse

一般为了防止过多活动的session占用资源,可以对允许连接到数据库的session个数,已连接到数据库的session空闲时间等进行限制(当

一般为了防止过多活动的session占用资源,可以对允许连接到数据库的session个数,已连接到数据库的session空闲时间等进行限制(当然也可以对尝试连接次数等其它很多内容进行限制)。方式就是可以通过创建一个profile配置,然后将这个profile配置赋给每个用户。

要使用这种限制的前提是将resource_limit这个参数设置为TRUE。

alter system set RESOURCE_LIMIT=true;

创建用户时如果未指定具体profile,会有一个默认的profile,名称是DEFAULT,如下所示:

SELECT * FROM dba_profiles WHERE PROFILE='DEFAULT';

ORA-02396: exceeded maximum idle time, please conn

这是这个名称为DEFAULT的所有配置项参数。

其中IDLE_TIME就是一个session连上Oracle后不做任何事情,挂在那里的空闲时间。DEFAULT默认所有的参数都是UNLIMITED,,也就是无限制。

但也可以对其进行修改。例如创建一个名称为idletime_profile的profile,并指定其中idle_time参数值是1,单位是分钟。

SQL> create profile idletime_profile limit idle_time 1;

Profile created.

并将该profile赋给用户bisal

SQL> alter user bisal profile idletime_profile;

User altered.

这样当用bisal登录到Oracle后,持续1分钟不干事,再次执行某个操作时就会报ORA-02396: exceeded maximum idle time, please connect agai

相关阅读:

SPFILE 错误导致数据库无法启动(ORA-01565)

ORA-01172、ORA-01151错误处理

ORA-00600 [2662]错误解决

ORA-01078 和 LRM-00109 报错解决方法

ORA-00471 处理方法笔记

ORA-00314,redolog 损坏,或丢失处理方法

ORA-00257 归档日志过大导致无法存储的解决办法

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn