系统:LINUX 5.6 64
数据库版本:11.2.0.2
环境:RAC
报错如下:
[oracle@ract2 ~]$ srvctl start instance -d racdb -i racdb1
PRCR-1013 : Failed to start resource ora.racdb.db
PRCR-1064 : Failed to start resource ora.racdb.db on node ract1
CRS-5017: The resource action "ora.racdb.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATAFILE/racdb/spfileracdb.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATAFILE/racdb/spfileracdb.ora
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux-x86_64 Error: 13: Permission denied
Additional information: 4685831
Additional information: 10
CRS-2674: Start of 'ora.racdb.db' on 'ract1' failed
分析:
看报错,应该是无法读取ASM中的文件,查看ASM实例已开启,在ASMCMD中也可以创建文件,说明存储是可以使用的。
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
+ASM2 STARTED
[grid@ract1 ~]$ asmcmd
ASMCMD> ls
BACKUP/
DATA/
DATAFILE/
ASMCMD> cd datafile
ASMCMD> ls
RACDB/
ASMCMD> mkdir aa
ASMCMD> ls
RACDB/
aa/
ASMCMD>
官方解释:
Oracle Server - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
RAC Instance can be started using sqlplus but fails when using srvctl:
Case I:
Case II
For Case I, the issue is caused wrong group (dba) is chosen for "ASM Database Administrator","ASM Instance Administration Operator" and "ASM Instance Administrator"
group during installing grid infrastructure, while the ASM disks are owned by oinstall group.
This same issue is documented in
Bug 9786198 - SRVCTL START DATABASE ORA-0178 FAILURE IN PROCESSING SYSTEM PARAMETERS
For Case II, the issue is caused by setuid and setgid bit missing for oracle binary under GRID_HOME, eg:
The missing setuid and setgid bit causing oracle user access failure to ASM diskgroup even though the ASMADMIN group is set correctly.
For case I,
Either reinstall Grid Infrastructure, select correct group for ASM Instance Administrator - ASMADMIN (oinstall in this case which is the ASM disk owning group)
or
stop srvctl modify oracle binary group from oinstall to dba by renaming $GRID_HOME/bin/setasmgid to $GRID_HOME/bin/setasmgid.orig. Restore the group ownership of oracle binary to oinstall and startup instance using srvctl.
For case II,
Add setuid and setgid bit for oracle binary under $GRID_HOME/bin:
The oracle binary for both GRID_HOME/bin and RDBMS ORACLE_HOME/bin should have 6751 permission, eg: -rwsr-s--x
查看下了权限,确实有问题
[root@ract1 bin]# cd /grid/product/11.2.0/bin
[root@ract1 bin]# ls -la oracle
-rwxr-x--x 1 grid oinstall 200678430 Jan 7 13:46 oracle
[root@ract1 bin]# chmod 6751 oracle - -注意使用root用户
[root@ract1 bin]# ls -la oracle
-rwsr-s--x 1 grid oinstall 200678430 Jan 7 13:46 oracle
修改权限后OK.。
[oracle@ract2 ~]$ srvctl start instance -d racdb -i racdb1
[oracle@ract2 ~]$
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26655292/viewspace-752818/ ,如需转载,请注明出处,否则将追究法律责任。