版本:Oracle 11g
系统:Solaris 5.10
问题:数据库卡慢,通过srvctl stop database -d orcl停止数据库后,再次启动,无法启动
报错如下:
PRCR-1079:Failed to start resource ora.orcl.db
CRS-5017: The resource action "ora.orcl.db start" encountered the following error:
ORA-27102: out of memory
但是通过SQLPLUS 使用startup,又启动了
Start Database by sqlplus, can not by srvctl on Solaris 10 (Oracle RAC 10G)
http://surachartopun.com/2008/12/start-database-by-sqlplus-can-not-by.html
After I changed project on Solaris 10.
projmod -s -K \"project.max-shm-memory=(privileged,13832385536,deny)\" oracle
something wrong, i can start instance by sqlplus, but can not by srvctl
srvctl start instance -d db -i db2
PRKP-1001 : Error starting instance db2 on node node02
CRS-0215: Could not start resource \'ora.db.db2.inst\'.
When checked log files on ORACLE_HOME/log/{hostname}/racg/imon*log
SQL> ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
SQL> Disconnected
So, found out some informations from matalink.
Cause
Problem is not the oracle project.
This occurs because when we start an instance using srvctl it will inherit the system project, since the crsd.bin is running as root, our racg infrastructure is starting the resource as oracle however racgwrap is initially started as root. It calls setuid/setgid to change the user & group IDs but unfortunately when we do this we dont call the project ID.
Solution
Easiest fix for this problem is to define a project for system.
% projmod -s -K \"project.max-shm-memory=(privileged,2.00TB,deny)\" system
% projmod -s -K \"process.max-sem-nsems=(privileged,2048,deny)\" system
Above assigns root user the system project in order for the CRSD daemon (run under root\'s user id) to pick up the changes:
% vi /etc/user_attr, add root to project=system:
Finally restart CRS stack
And then I modified project (for system project)
projmod -s -K \"project.max-shm-memory=(privileged,13832385536,deny)\" oracle
projmod -s -K \"project.max-shm-memory=(privileged,15132385536,deny)\" system
that helped me solve this case.
srvctl start instance -d db -i db2
收起