資料庫啟動報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