数据库启动报ORA-27154 ORA-27300 ORA-27301 ORA-27302错误
今天同事遇到一个Oracle启动的问题,
sql> startup
ORA-27154: post/wait create failed
ORA-27300: OS system dependentoperation:semget failed with status: 28
ORA-27301: OS failure message: No spaceleft on device
ORA-27302: failure occurred at:sskgpsemsper
[oracle@info bin]$ df -h
Filesystem Size Used Avail Use% Mounted
/dev/sda2 764G 572G 154G 79% /
/dev/sda5 57G 3.5G 51G 7% /home
/dev/sda3 473G 309G 140G 69% /u01
/dev/sda1 190M 25M 156M 14% /boot
tmpfs 32G 17G 16G 52% /dev/shm
检查磁盘,看来不是磁盘空间的问题。
该问题存在与11.2.0.1 之后的版本,,导致的原因是因为semmns 的值太低。 该值在/etc/sysctl.conf中配置。
kernel.sem = semmsl semmns semopm semmni
原来值为:
kernel.sem = 250 32000 100 128
修改值为:
kernel.sem = 256 32768 100 228
修改之后保存退出,之后执行sysctl -p使修改之后的参数生效,之后重启数据库。就OK了。
semaphores 参数的优化原则如下:
1. Calculate the minimum total semaphorerequirements using the following formula:
2*sum (process parameters of all databaseinstances on the system) + overhead for background processes + system and otherapplications.
2. Set semmns (total semaphores systemwide)to this total.
3. Set semmsl (semaphores for each set ) to256
4. Set semmni (total semaphores sets) tosemmns devided by semmsl, rounded up to the nearest multiple of 1024