1.1
现象描述
数据库异常关闭后,无法登录数据库。检查并关闭所有Oracle进程,然后再次登录数据库。登录失败,系统显示如下错误信息:
% sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Dec 28 06:24:55 2009
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-00020: maximum number of processes (%s) exceeded
1.2
可能原因
关闭所有Oracle进程,但是Oracle资源没有释放完全,导致登录数据库失败。
1.3
定位思路
检查是否存在没有释放的Oracle消息队列。
% ipcs
系统提示如下信息:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x60c1edf0 229376 oracle 660 4096 0
0x54fe0010 262145 scu 666 905897 6
0x46fe0010 294914 scu 666 276 2
0x53fe0010 327683 scu 664 17300480 3
0x45fe0010 360452 scu 666 16400 2
0x56fe0010 425990 scu 666 808 2
0x49fe0010 589835 scu 666 5124 2
------ Semaphore Arrays --------
key semid owner perms nsems
0x002fa327 0 root 666 2
0x3fdf6c2c 294913 oracle 660 304
0x32fe0010 360451 scu 666 512
------ Message Queues --------
key msqid owner perms used-bytes messages
由以上“ shmido
”值为“ 229376
”和“ semid
”值为“ 294913
”得知,存在没有被释放的 Oracle
消息队列。
1.4
处理步骤
以 oracle
用户登录数据库所在机器。
释放 Oracle
共享内存段和共享信号量资源。
% ipcrm -m
Shared Memory Segments的ID
% ipcrm -s
Semaphore Arrays的ID
以 sysdba
用户连接数据库。
% sqlplus / as sysdba
连接成功,系统显示如下信息:
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Dec 28 06:24:55 2009
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options