在Install Grid Infrastructure for standalone server dbca到97%时,报错:PRCR-1079,ORA-01031,ORA-01031等错误。

 

PRCR-1079 ORA-01031 CRS-2674 SRVCTL Fails to Start Database in Oracle Restart Job Role Separation Environment

手动执行start 也报错:

[grid@history ~]$ srvctl start database -d history
PRCR-1079 : Failed to start resource ora.history.db
ORA-01031: insufficient privileges
CRS-5017: The resource action "ora.history.db start" encountered the following error: 
ORA-01031: insufficient privileges
. For details refer to "(:CLSN00107:)" in "/u01/app/11.2/grid/log/history/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of 'ora.history.db' on 'history' failed
ORA-01031: insufficient privileges

 

 

解决方法:

[oracle@history db_1]$ /u01/app/oracle/product/11.2/db_1/bin/osdbagrp
dba
[oracle@history db_1]$ 

grid用户增加dba组
[root@history ~]# groups grid
grid : oinstall asmadmin asmdba asmoper
[root@history ~]# 
[root@history ~]# usermod -a -G dba grid
[root@history ~]# groups grid
grid : oinstall dba asmadmin asmdba asmope

 

srvctl start database 检查

[grid@history ~]$ srvctl start database -d history
[grid@history ~]$ 
[grid@history ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    history     
ora....ER.lsnr ora....er.type ONLINE    ONLINE    history     
ora.asm        ora.asm.type   ONLINE    ONLINE    history     
ora.cssd       ora.cssd.type  ONLINE    ONLINE    history     
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    history     
ora.history.db ora....se.type ONLINE    ONLINE    history     
ora.ons        ora.ons.type   ONLINE    ONLINE    history         

 

已经看到可以online了。。

 

官方说明:

CAUSE

Possible causes:

1. Grid Infrastructure owner is not part of OSDBA group for the database thats being start up.
2. Grid Infrastructure owner doesn't have write permission to database dbs ($ORACLE_HOME/dbs) directory.

SOLUTION

1. As per documentation <Oracle Database Administrator's Guide 11g Release 2 (11.2) -> Configuring Oracle Restart -> Adding Components to the Oracle Restart Configuration>,  Grid Infrastructure owner must be part of OSDBA group if the database need to be managed by srvctl.

To find out OSDBA group for RDBMS home, execute: $RDBMS_HOME/bin/osdbagrp

To find out whether grid user is already part of OSDBA group, execute: groups <grid>

Location for groups command is /usr/bin/groups on Linux, and /bin/groups on AIX, Solaris and hp-ux

2. If Grid Infrastructure owner is already part of OSDBA group and the issue still exist, add group write permission to $RDBMS_HOME/dbs directory; for example
 

cd $RDBMS_HOME
chmod g+w dbs
ls -ld dbs