重庆思庄Oracle、Redhat认证学习论坛

标题: 不能启动gi环境中的dg备库 [打印本页]

作者: 郑全    时间: 2018-1-24 12:46
标题: 不能启动gi环境中的dg备库
本帖最后由 郑全 于 2018-1-24 12:54 编辑

Unable to start the database using SRVCTL in Oracle Restart or Grid Infrastructure with Physical Standby environment (文档 ID 1487620.1)

In this Document

Symptoms
Cause
Solution

Applies to:   Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
SymptomsOn dataguard environment running on Grid Infrastructure (GI) or on Oracle Restart, the database fails to start because the database name and database unique name are different.

The following srvctl commands are used to add the database (note that srvctl add database command does not have -n flag that is used to specify the db name):
The db_unique_name id PP0384ELM7_1
The db_name PP0384 (as also the instance)

srvctl add database -d PP0384ELM7_1 -o /u01/app/oracle/product/11.2.0.2/db_1 -a "DATA_PP0384ELM7_1,ARCH_PP0384ELM7_1,BKUP_PPAX2039" -r PHYSICAL_STANDBY -s MOUNT
srvctl setenv database -d PP0384ELM7_1 -T TNS_ADMIN=/u01/app/oracle/network/admin
srvctl setenv database -d PP0384ELM7_1 -t ORACLE_BASE=/u01/app/oracle
srvctl modify database -d PP0384ELM7_1 -m IKEADT.COM -n PP0384
srvctl modify database -d PP0384ELM7_1 -p +DATA_PP0384ELM7_1/PP0384ELM7_1/spfilePP0384.ora
The above commands are executed successfully, and the OCR configuration is pointing to correct SPfile.
srvctl config database -d PP0384ELM7_1 -a

Database unique name: PP0384ELM7_1
Database name: PP0384
...
Spfile: +DATA_PP0384ELM7_1/PP0384ELM7_1/spfilePP0384.ora
...
But trying to start the database gives the following error:
srvctl start database -d pp0384elm7_1

PRCR-1079 : Failed to start resource ora.pp0384elm7_1.db
CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0.2/db_1/srvm/admin/oratab.bak.ppseelm-ax2039" failed: details at "(:CLSN00011:)" in "/u01/app/11.2.0.2/grid/log/ppseelm-ax2039/agent/ohasd/oraagent_grid/oraagent_grid.log"
CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0.2/db_1/dbs/initPP0384ELM7_1.ora" failed: details at "(:CLSN00014:)" in "/u01/app/11.2.0.2/grid/log/ppseelm-ax2039/agent/ohasd/oraagent_grid/oraagent_grid.log"
CRS-5017: The resource action "ora.pp0384elm7_1.db start" encountered the following error:
CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0.2/db_1/dbs/initPP0384ELM7_1.ora" failed: details at "(:CLSN00014:)" in "/u01/app/11.2.0.2/grid/log/ppseelm-ax2039/agent/ohasd/oraagent_grid/oraagent_grid.log"
The above error shows that it is looking for an initPP0384ELM7_1.ora based on the db_unique_name and not on SID.
CauseCustomer added a database using srvctl without -n {db name} option.

The Oracle® Real Application Clusters Administration and Deployment Guide11g Release 2 (11.2) says the following about -n option in "srvctl add database" command"
-n db_name  "The name of the database, if it is different from the unique name given by the -d option"Solution1) Remove the database resource from GI using srvctl remove database command
    For example,
    srvctl remove database -d pp0384elm7_1
2) Recreate the database resource with just one command containing both the -d and -n parameters.  
    For example,
    srvctl add database -d pp0384elm7_1 -n pp0384 -o /u01/app/oracle/product/11.2.0.2/db_1 -a "DATA_PP0384ELM7_1,ARCH_PP0384ELM7_1,BKUP_PPAX2039" -r PHYSICAL_STANDBY -s MOUNT -m IKEADT.COM -p +DATA_PP0384ELM7_1/PP0384ELM7_1/spfilePP0384.ora







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2