10gR2-11gR1,11gR2如何干净的清除并重建OCR和表决磁盘
下面分别讨论10gR2-11gR1和11gR2干净的清除并重建OCR和表决磁盘的方法。
一.10gR2-11gR1干净的清除并重建OCR和表决磁盘的方法
参考METALINK文章:ID 399482.1
| How to Recreate OCR/Voting Disk Accidentally Deleted [ID 399482.1] | |||||
|
|
|||||
| 修改时间 13-JUN-2011 类型 HOWTO 状态 PUBLISHED | |||||
In this Document
Goal
Solution
References
Applies to:
Oracle Server - Standard Edition - Version: 10.2.0.1 to 11.1.0.7 - Release: 10.2 to 11.1
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.7 [Release: 10.2 to 11.1]
Generic UNIX
Generic Linux
Oracle Clusterware
Goal
The goal of this document is to help customers who have accidentally deleted the OCR, voting disk or the files that are required for the operation of Oracle clusterware.
Depending on the issue, it may or may not be good idea to execute the steps provided.
- OCR
- If the OCR has been deleted, then check if the OCR mirror is OK and vice versa. It may be prudent to use the OCR mirror to create the OCR. For steps on this check the documentation: Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
- If the OCR mirror and OCR have been deleted, then it may be faster to restore the OCR using the OCR backups. For steps on this check the documentation: Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
- Voting Disk
- If there are multiple voting disks and one was accidentally deleted, then check if there are any backups of this voting disk. If there are no backups then we can add one using the crsctl add votedisk command. The complete steps are in the: Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
- SCLS directories
- These are internal only directories which are created by root.sh, if this directory is accidentally removed then they can only be created by the steps documented below
- Socket files in /tmp/.oracle or /var/tmp/.oracle
- If these files are accidentally deleted, then stop the Oracle Clusterware on that node and restart it again. This will recreate these socket files. If the socket files for cssd is deleted then the Oracle Clusterware stack may not come down in which case the node has to be bounced.
Solution
If none of the steps documented above can be used to restore the file that was accidentally deleted or is corrupted, then the following steps can be used to re-create/reinstantiate these files. The following steps require complete downtime on all the nodes.
- Shutdown the Oracle Clusterware stack on all the nodes using command crsctl stop crs as root user.
- Backup the entire Oracle Clusterware home.
- Execute <CRS_HOME>/install/rootdelete.sh on all nodes
- Execute <CRS_HOME>/install/rootdeinstall.sh on the node which is supposed to be the first node
- The following commands should return nothing
- ps -e | grep -i 'ocs[s]d'
- ps -e | grep -i 'cr[s]d.bin'
- ps -e | grep -i 'ev[m]d.bin'
- Execute <CRS_HOME>/root.sh on first node
- After successful root.sh execution on first node Execute root.sh on the rest of the nodes of the cluster
- For 10gR2, use racgons. For 11g use onsconfig command. Examples for each are provided below.
For 10g
Execute as owner (generally oracle) of CRS_HOME command
<CRS_HOME>/bin/racgons add_config hostname1:port hostname2:port$/u01/crs/bin/racgons add_config halinux1:6251 halinux2:6251For 11g
Execute as owner (generally oracle) of CRS_HOME command
<CRS_HOME>/install/onsconfig add_config hostname1:port hostname2:port$/u01/crs/install/onsconfig add_config halinux1:6251 halinux2:6251 - Execute as owner of CRS_HOME (generally oracle) <CRS_HOME>/bin/oifcfg setif -global. Please review Note 283684.1 for details.
$/u01/crs/bin/oifcfg setif -global eth0/192.168.0.0:cluster_interconnect eth1/10.35.140.0:public
- Add listener using netca. This may give errors if the listener.ora contains the entries already. If this is the case, move the listener.ora to /tmp from the $ORACLE_HOME/network/admin or from the $TNS_ADMIN directory if the TNS_ADMIN environmental is defined and then run netca. Add all the listeners that were added earlier.
- Add ASM & database resource to the OCR using the appropriate srvctl add database command as the user who owns the ASM & database resource. Please ensure that this is not run as root user
- Add Instance, services using appropriate srvctl add commands. Please refer to the documentation for the exact commands.
- execute cluvfy stage -post crsinst -n node1,node2 ### Please ensure to replace node1,node2 with the node names of the cluster
References
NOTE:557178.1 - RAC on Windows: How To Reinitialize the OCR and Vote Disk (without a full reinstall of Oracle Clusterware)
二.11gR2干净的清除并重建OCR和表决磁盘的方法
11gR2是新版本的数据库,清除并重建OCR和表决磁盘的方法变得更加简单:
执行:$GRID_HOME/crs/install/rootcrs.pl -deconfig -force
如果是RAC的最后一个节点,那么执行:$GRID_HOME/crs/install/rootcrs.pl -deconfig -force -lastnode
注意:
1).如果在RAC中有任何节点是正常工作的,那么在问题节点执行以上命令来清除本节点的OCR和表决磁盘信息,然后重建,不必直接删除OCR和表决磁盘文件进行重建。
2).如果RAC所有节点都出现问题,需要所有节点重建OCR和表决磁盘,那么也不能直接将OCR和表决磁盘删除,重新执行root.sh进行重建,必须同样的执行以上命令,如果将OCR和表决磁盘文件之间删除,执行root.sh脚本会收到如下信息:
上面代码显示是成功的,实际上什么也没做。
结论:
因为在现有的系统中的很多地方都保存有OCR和表决磁盘的相关配置信息,在重建OCR和表决磁盘之前要将其清除干净,不清除干净这些配置信息将无法很好的重建OCR和表决磁盘。10gR2-11gR1和11gR2在清除方法上是不同的,11gR2进行的简化,之前的版本要复杂一些。
另外,清除OCR和表决磁盘并未删除安装好的Oracle软件,而是在现有的基础上重建OCR和表决磁盘。如果要连Oracle相关软件都需要重新安装,10gR2-11gR1请参考文章:http://space.itpub.net/23135684/viewspace-682913 ,11gR2也简化了这个过程,使用GI和Oracle软件Home目录下的deinstall/deinstall命令即可轻松、干净的清除相关配置信息,及Oracle安装的软件。
http://blog.itpub.net/23135684/viewspace-721081/
10gR2-11gR1,11gR2如何干净的清除并重建OCR和表决磁盘的更多相关文章
- 【总文档】rac增加新节点的方法步骤 How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterware and RAC
[总文档]How to Add Node/Instance or Remove Node/Instance in 10gR2, 11gR1, 11gR2 and 12c Oracle Clusterw ...
- 【转】windows server 2012清除并重建SID
windows server 2012清除并重建SID 2012-09-17 17:51:51 标签:SID windows server 2012 原创作品,允许转载,转载时请务必以超链接形式标明文 ...
- 如何干净的清除Slave同步信息
MySQL> show master status; +------------------+-----------+--------------+------------------+---- ...
- OGG 进程清除、重建
背景描述:有时候OGG进程同步出现问题,症状某些进程起不来,而且问题一时半会儿解决不了.最简单的办法是:用数据泵初始化数据,OGG进程重建. 1.查看源端.目的端的进程状态. (作者OGG进程是正常的 ...
- Windows server 2012清除并重建SID
首先介绍下什么是SID SID也就是安全标识符(Security Identifiers),是标识用户.组和计算机帐户的唯一的号码.在第一次创建该帐户时,将给网络上的每一个帐户发布一个唯一的 SID. ...
- Windows server 2012R清除并重建SID 用于制作封装模板
首先介绍下什么是SID SID也就是安全标识符(Security Identifiers),是标识用户.组和计算机帐户的唯一的号码.在第一次创建该帐户时,将给网络上的每一个帐户发布一个唯一的 SID. ...
- ORACLE 11gR2 RAC添加删除(正常及强制)节点操作步骤(删除篇)
ORACLE 11gR2 RAC添加删除(正常及强制)节点操作步骤(删除篇) 本文主要转载 [ http://www.cnxdug.org/?p=2511 ] 有部分细节自己实验添加,再此谢谢前辈. ...
- 转 oracheck
转 https://dbaplus.cn/news-10-220-1.html ORAchk 之前被称为RACcheck,后来它的检查范围进行了扩展,改名为了ORAchk,它是在数据库系统进行健康检查 ...
- Oracle 补丁那些事儿(PS、PSU、CPU、SPU、BP、DBBP…)
当前ORACLE数据库提供两种方式的补丁一种是主动的Proactive Patches和另一种被动的Reactive Patches,其中Reactive Patches是指过去的ONE-OFF Pa ...
随机推荐
- 数据导出至Excel文件--好库编程网http://code1.okbase.net/codefile/SerializeHelper.cs_2012122018724_118.htm
using System; using System.IO; using System.Data; using System.Collections; using System.Data.OleDb; ...
- Android ActionBarSherlock使用教程
Android ActionBarSherlock使用教程 本文转自 http://www.chenwg.com/android/actionbarsherlock%E4%BD%BF%E7%94%A8 ...
- 【jmter】逻辑控制器(Logic Controller)
1. Jmeter官网对逻辑控制器的解释是:“Logic Controllers determine the order in which Samplers are processed.”.意思是说, ...
- HTML5常识总结(一)
一.HTML5的发展历程 + html演变的几个版本: html2.0.html3.2.html4.0.html4.01.html5. + 其中在html4.01发布之后,还发布了xtml1.0,它是 ...
- bzoj3163: [Heoi2013]Eden的新背包问题
Description “寄没有地址的信,这样的情绪有种距离,你放着谁的歌曲,是怎样的心心静,能不能说给我听.”失忆的Eden总想努力地回忆起过去,然而总是只能清晰地记得那种思念的感觉,却不能回忆起她 ...
- haproxy实现负载均衡
一.安装tar zxvf haproxy-1.4.22.tar.gzcd haproxy-1.4.22make TARGET=linux26 PREFIX=/usr/local/haproxy ins ...
- 黄聪:PHP 免费获取手机号码归属地(转)
一.淘宝网API API地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15850781443 参数: tel:手机号码 返回 ...
- PLSQL_性能优化系列06_Oracle Soft Parse / Hard Parse软硬解析
2014-08-11 Createed By BaoXinjian
- OAF_OAF Debug And Log调试和记录工具的详解(案例)
2014-06-16 Created By BaoXinjian
- 2016 Multi-University Training Contest 5 Two
本文转自:http://blog.csdn.net/queuelovestack/article/details/52096337 题意: 给你两个序列A和B 问两个序列有多少个子序列一样 例如{1, ...