无备份情况下重建ocr 和 votedisk – 19c
备注:测试环境基本上都有ocr自动备份文件,建议参考有备份情况下恢复ocr和votedisk
Deconfigure and reconfigure entire cluster will rebuild OCR and Voting Disk, user resources (database, instance, service, listener etc) will need to be added back to the cluster manually after reconfigure finishes.
How to Deconfigure/Reconfigure(Rebuild OCR) or Deinstall Grid Infrastructure (Doc ID 1377349.1)
How to Configure or Re-configure Grid Infrastructure With config.sh/config.bat (Doc ID 1354258.1)
- 远端节点执行:
[root@db3n2 ~]# /u01/app/19c/19.3.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose
- 最后一个节点执行
[root@db3n1 ~]# /u01/app/19c/19.3.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode
#所有节点手动删除gpnp目录
2020/03/09 16:17:58 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/app/19c/19.3.0/grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.
- 重新执行$GI_HOME/gridSetup.sh
#重新注册数据磁盘组到crs
SQL> alter diskgroup datadg mount;
#重新注册数据库资源
[oracle@db3n1 ~]$ srvctl add database -db orcldb -oraclehome /u01/app/19c/oracle/product/19.3.0/db_1 -dbtype RAC -spfile '+datadg/ORCLDB/PARAMETERFILE/spfile.272.1034093697' -pwfile '+datadg/ORCLDB/password/pwdorcldb.256.1034092525' -role primary -startoption open -stopoption immediate -dbname orcldb -policy automatic -diskgroup DATADG
[oracle@db3n1 ~]$ srvctl add instance -d orcldb -i orcldb1 -n db3n1
[oracle@db3n1 ~]$ srvctl add instance -d orcldb -i orcldb2 -n db3n2
#检查监听状态
#检查数据情况,数据未丢失