ORA-00018 问题处理

来源:互联网 发布:淘宝代销流程 编辑:程序博客网 时间:2024/06/06 01:40

ORA-00018 问题处理

该错误是由于数据库的session个数不够用导致的。在11GR2之前的版本中,session个数是通过设置的process个数计算出来的,计算公式为:
sessions = 1.1 * processes + 5。在之后的版本中,oracle不再完全按照该公式来计算sessions个数。

一般的解决办法都是通过调整max process的大小:
alter system set processes=400 scope=spfile;
重新启动后生效。

SESSIONS

Property Description Parameter type Integer Default value Derived: (1.1 * PROCESSES) + 5 Modifiable No Range of values 1 to 231 Basic Yes

通过三个命令可以查看当前信息:

select value from v$parameter where name = 'sessions';select count(*) from v$session;select * from v$resource_limit;

其中V$SESSION 仅包含USER and BACKGROUND sessions,不包含 RECURSIVE sessions,因此不代表系统全部的session个数。

Recursive sessions are an essential part of the normal functioning of the RDBMS. It is impossible to identify every circumstance that would require such sessions, but in general, if a user-initiated operation requires the manipulation of data dictionary objects, then recursive sessions may get created. To take a simple example, say you create a table while logged in as some ordinary user. Behind the scenes this has to insert rows into obj,tab etc. which are owned by the SYS user. Since a normal user would have no privilege to insert into these objects, a recursive session is created which logs in as SYS.

https://community.oracle.com/thread/2470121
http://www.xifenfei.com/forum/accident/ora-00018-maximum-number-of-sessions-exceeded
http://blog.chinaunix.net/uid-22948773-id-3429457.html
http://www.itpub.net/thread-1800129-1-1.html

原创粉丝点击