srvctl start database启动数据库报CRS-5010错误的解决办法

今天我在自己虚拟机上做实验,做一个集群资源的删除,首先我执行了srvctl remove database -d orcl,然后我进行了重新添加srvctl add database,添加完成后我突然发现srvctl start database -d orcl不能够启动数据库,报了一堆错误,经过查询metalink解决了该问题.记录一下解决该问题的办法.

[oracle@asm db_1]$ srvctl start database -d orcl
PRCR-1079 : Failed to start resource ora.orcl.db
CRS-5010: Update of configuration file "/oracle/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora" failed: details at "(:CLSN00014:)" in "/oracle/app/11.2.0/grid/log/asm/agent/ohasd/oraagent_grid/oraagent_grid.log"
CRS-5017: The resource action "ora.orcl.db start" encountered the following error:
CRS-5010: Update of configuration file "/oracle/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora" failed: details at "(:CLSN00014:)" in "/oracle/app/11.2.0/grid/log/asm/agent/ohasd/oraagent_grid/oraagent_grid.log"
. For details refer to "(:CLSN00107:)" in "/oracle/app/11.2.0/grid/log/asm/agent/ohasd/oraagent_grid/oraagent_grid.log".
CRS-2674: Start of 'ora.orcl.db' on 'asm' failed

这儿可以看到我的数据库启动不了,报了CRS-5010的错误,查询了metalink的文档,发现这是一个BUG,BUG号11063852.它说引起的原因是在重启的时候agent进程需要去修改$ORACLE_HOME/db s和$ORACLE_HOME/srvm/admin.Gird用户没有这两个目录的写入权限,所以启动失败.而我把这两个目录的权限都设置成了755还是出现上述问题.但是我还看到它的解决办法里面说需要检查spfile的路径,集群注册表中OCR记录的spfile的路径,还有$ORACLE_HOME/dbs.initorcl.ora记录的路径名必须保持一致.于是乎我做了下列的检查,并发现了最终原因.

[oracle@asm dbs]$ more /oracle/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora
SPFILE='+DATA/orcl/spfileorcl.ora'
[oracle@asm ~]$ srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /oracle/app/oracle/product/11.2.0/db_1/
Oracle user: oracle
Spfile: +DATA/ORCL/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Database instance: orcl
Disk Groups: DATA
Services:
ASMCMD> pwd
+DATA/ORCL
ASMCMD> ls -l spfileorcl.ora
Type           Redund  Striped  Time             Sys  Name
                                                 N    spfileorcl.ora => +DATA/ORCL/PARAMETERFILE/spfile.267.777943741
ASMCMD>

这里我们可以看到$ORACLE_HOME/dbs.initorcl.ora下面记录的和其他的是不一样的,有大小写区分.我改成了大写,问题搞定.

[grid@asm app]$ more /oracle/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora
SPFILE='+DATA/ORCL/spfileorcl.ora'
[grid@asm app]$ srvctl stop database -d orcl
[grid@asm app]$ srvctl start database -d orcl

参考文档:Oracle Restart: srvctl fails to start database with error CRS-5010 if RDBMS and Grid under different users [ID 1335607.1]

分享到: 更多

Post a Comment

Your email is never published nor shared. Required fields are marked *