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 ...
随机推荐
- sqlplus将查询结果重定向到文件,不输出到屏幕
--每行的字符数目 --该参数设置每页输出的行数.n=0表示不产生新页 --显示和拷贝long类型值的最大宽度的设置,最大值2G --sqlplus检索long类型值的增量大小.由于内存的限制 可按增 ...
- android 为应用程序创建桌面快捷方式技巧分享
手机装的软件过多,找起来很不方便,所以在主页面有一个快捷方式的话会很不错的,本文将介绍如何实现,需要了解跟多的朋友可以参考下 我们开发一款软件后,如果手机装的软件过多,去翻的话会很难翻的,所以 ...
- .NET使用OpenSSL生成的pem密钥文件
NET要使用OpenSSL生成的pem密钥文件,网上资料很少(http://www.faqs.org/rfcs/rfc1421.html,RFC1421文件又老长老长),仅有的资料还是有错误的,所以今 ...
- 求助:为什么我用360浏览器和UC浏览器打不开JAVA中的index.html文件? 一打开就显示浏览器首界页
如下图,在oracle官网下载了一个JAVA的API文档,双击index.html时打开是浏览器的首页,不知道为什么?请问怎样才能以chm文档格式显示?
- Linux后台开发常用工具
内存分析工具valgrind valgrind辅助工具qcachegrind 可视化查看valgrind结果 淘宝DBA团队发布的监控脚本,使用perl开发,可以完成对linux系统和MySql相关指 ...
- 【转 】实战手记:让百万级数据瞬间导入SQL Server
想必每个DBA都喜欢挑战数据导入时间,用时越短工作效率越高,也充分的能够证明自己的实力.实际工作中有时候需要把大量数据导入数据库,然后用于各种程序计算,本文将向大家推荐一个挑战4秒极限让百万级数据瞬间 ...
- hbase读写流程
一. Hbase读流程 META表记录着表的原信息,根据rowkey查询META表,获取所在region信息 客户端去相应的regionServer查询数据,先查询memStore(memstore是 ...
- Storm的数据处理编程单元:Bolt 学习整理
Bolt是Topology中的数据处理的单元,也是Storm针对处理过程的编程单元.Topology中所有的处理都是在这些Bolt中完成的,编程人员可以实现自定义的处理过程,例如,过滤.函数.聚集.连 ...
- SG函数
入门一: 首先来玩个游戏,引用杭电课件上的: (1) 玩家:2人:(2) 道具:23张扑克牌:(3) 规则:游戏双方轮流取牌:每人每次仅限于取1张.2张或3张牌:扑克牌取光,则游戏结束:最后取牌的一方 ...
- NeHe OpenGL教程 第二十课:蒙板
转自[翻译]NeHe OpenGL 教程 前言 声明,此 NeHe OpenGL教程系列文章由51博客yarin翻译(2010-08-19),本博客为转载并稍加整理与修改.对NeHe的OpenGL管线 ...