Oracle Database Instance Startup Fails With Error ORA-27302 ORA-27301

今天启动Oracle Enterprise Linux 5虚拟机中的Oracle11gR2数据库,但是报错。

[oracle@dbserver ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 16 13:28:44 2009

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper

sskgpsemsper函数可以很简单的猜测是跟semaphore有关,而ORA-27301则是No space left on device,那么很容易判断应该是操作系统内核参数中semaphore设置的问题。

[root@dbserver ~]# /sbin/sysctl -a | grep sem
kernel.sem = 250        100     32      128

而实际上,安装Oracle11gR2的semaphore需求是:
semmsl:250
semmns:32000
semopm:100
semmni:128

很明显semmns和semopm都不足。

[root@dbserver ~]# /sbin/sysctl -w kernel.sem="250 32000 100 128"
kernel.sem = 250 32000 100 128
[root@dbserver ~]# /sbin/sysctl -a | grep sem
kernel.sem = 250        32000   100     128
[root@dbserver ~]# echo "kernel.sem = 250 32000 100 128"  >> /etc/sysctl.conf
[root@dbserver ~]# 

重新启动数据库实例正常。

Leave a Reply

Your email address will not be published. Required fields are marked *