Oracle 11g rac ocr and db_unique_name configuration relationship description 1. Problem 1: the following error is found in the alert log of RAC standby:
SUCCESS: diskgroup DATA was mountedERROR: failed toestablish dependency between database dave_st and diskgroup resourceora.DATA.dgSUCCESS: diskgroup FRA was mountedERROR: failed toestablish dependency between database dave_st and diskgroup resource ora.FRA.dg
The database instance name was originally dave. Because it was made into RAC standby, db_unique_name of the database was changed to dave_st. There is no problem with this in a single instance, but RAC's db_unique_name will also be registered in OCR. Therefore, in addition to modifying db_unique_name of the database, standby of RAC also needs to be modified in OCR. My case here is that my original RAC environment has been set up, if it is a new environment, this problem will not occur. Ii. Problem 2 the original db_unique_name was dave and was changed to dave_st. Then the pfile of the RAC node will be automatically modified. Even if we change it to dave_st, when we start the database using srvctl start, it will be automatically changed to dave, resulting in no startup. Of course, after manual modification, the sqlplus instance can be started normally, but the srvctl instance is used to check whether the instance status is not started. This is also why srvctl is recommended in the RAC environment to start and close the database, rather than using sqlplus directly.
[oracle@rac2 dbs]$ cat initdave2.oraSPFILE='+DATA/dave/spfiledave.ora' # line added by Agent
As a result, the startup file cannot be found at startup and an error is reported as follows:
[oracle@rac1 dbs]$ srvctl start database -ddavePRCR-1079 : Failed to start resourceora.dave.dbCRS-5017: The resource action"ora.dave.db start" encountered the following error:ORA-01078: failure in processing systemparametersORA-01565: error inidentifying file '+DATA/dave/spfiledave.ora'ORA-17503: ksfdopn:2Failed to open file +DATA/dave/spfiledave.oraORA-15056: additional error messageORA-17503: ksfdopn:2 Failed to open file+DATA/dave/spfiledave.ora
3. The above two problems are solved because of the database configuration problems in OCR. -- View the current configuration:
[grid@rac1 ~]$ srvctl config database -ddaveDatabase unique name:daveDatabase name: daveOracle home: /u01/app/oracle/11.2.0/db_1Oracle user: oracleSpfile:+DATA/dave/spfiledave.oraDomain:Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: daveDatabase instances:dave1,dave2Disk Groups: DATA,FRAMount point paths:Services:Type: RACDatabase is administrator managed[grid@rac1 ~]$
Here we will change db_unique_name to dave_st. But it cannot be modified directly. We need to remove the database first and modify it. You must use the oracle user to perform the operation here. Otherwise, the database may fail to start due to permission issues.
[Oracle @ rac1 ~] $ Srvctl remove database-d dave [oracle @ rac1 ~] $ Srvctlconfig database-d dave_stDatabase unique name: dave_stDatabase name: daveOracle home:/u01/app/oracle/11.2.0/db_1Oracle user: oracleSpfile: Domain: Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: dave_stDatabase instances: Disk Groups: Mount point paths: Services: Type: RACDatabase is administrator managed [oracle @ rac1 ~] $ -- Modify other database resources: [oracle @ rac1 ~] $ Srvctl modify database-d dave_st-a DATA, FRA [oracle @ rac1 ~] $ Srvctl add instance-d dave_st-I dave1-n rac1 [oracle @ rac1 ~] $ Srvctl add instance-d dave_st-I dave2-n rac2 [oracle @ rac1 ~] $ Srvctl modify database-d dave_st-p + DATA/dave_st/spfiledave. ora: [oracle @ rac1 ~] $ Srvctl config database-d dave_st Database unique name: dave_stDatabase name: daveOracle home:/u01/app/oracle/11.2.0/db_1Oracle user: oracleSpfile: + DATA/dave_st/spfiledave. oraDomain: Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: dave_stDatabase instances: dave1, dave2Disk Groups: DATA, FRAMount point paths: Services: Type: RACDatabase is administrator managed [oracle @ rac1 dbs] $ srvctlstatus database-d dave_st Instance dave1 is running on node rac1Instance dave2 is running on node rac2 -- verify the Process status: [grid @ rac1 u01] $ crs_stat.shName Target State Host ------------------------------ ------------------- ------- ora. DATA. dg ONLINE rac1 ora. FRA. dg ONLINE rac1 ora. LISTENER. lsnr ONLINE rac1 ora. LISTENER_SCAN1.lsnr ONLINE rac1 ora. OCRVOTING. dg ONLINE rac1 ora. asm ONLINE rac1 ora. cvu OFFLINE ora. dave_st.db ONLINE rac1 ora. gsd OFFLINE ora. net1.network ONLINE rac1 ora. for more information, see <G id = "1"> overview </G>. ons ONLINE rac1 ora. rac1.ASM1. asm ONLINE rac1 ora. rac1.LISTENER _ RAC1.lsnr ONLINE rac1 ora. rac1.gsd OFFLINE ora. rac1.ons ONLINE rac1 ora. rac1.vip ONLINE rac1 ora. rac2.ASM2. asm ONLINE rac2 ora. rac2.LISTENER _ RAC2.lsnr ONLINE rac2 ora. rac2.gsd OFFLINE ora. rac2.ons ONLINE rac2 ora. rac2.vip ONLINE rac2 ora. registry. acfs ONLINE rac1 ora. scan1.vip ONLINE rac1 [grid @ rac1 u01] $ ls
The above experiment shows that the records in OCR are determined based on DB_UNIQUE_NAME. Instead of DB_NAME.