Tuesday, December 09, 2008

Start Database by sqlplus, can not by srvctl on Solaris 10 (Oracle RAC 10G)

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
.
.
.

2 comments:

mxmader said...

Thanks for the post. The default installation of RAC and operations of DBCA yielded a system which would not automatically start the RAC instances on either host of a 2-node cluster. This platform truly lacks unified, platform-specific documentation.

Surachart said...

we can use to

$ export SRVM_TRACE=true
$ srvclt start instance -d db -i db1

Or after use srvctl ... check $ORACLE_HOME/log/node_name/*/*