Oracle推荐在对集群调整时,比方添加、删除节点之前,应对OCR进行备份,能够用export备份到指定文件。假设做了replace或者restore等操作,Oracle建议使用cluvfy comp ocr -n all命令做一个全面的检查。

在oracle用户下运行:

[oracle@felix1 bin]$ cluvfy comp ocr  -n all

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clusteredconfiguration...

All nodes free of non-clustered, local-onlyconfigurations.

Uniqueness check for OCR device passed.

Checking the version of OCR...

OCR of correct Version "2" exists.

Checking data integrity of OCR...

Data integrity check for OCR passed.

OCR integrity check passed.

Verification of OCR integrity was successful.

[oracle@felix1 bin]$

(1)关闭全部节点的crs

[root@felix1 bin]# ./crsctl stop crs

Stopping resources. This could take severalminutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@felix1 bin]#

[root@felix2 bin]# ./crsctl stop crs

Stopping resources. This could take severalminutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@felix2 bin]#

(2)导出OCR内容

cd $CRS_HOME/bin

(注意须要在root用户下运行)

[root@felix1 bin]# ./ocrconfig -export ocr_exp.exp

(3)启动CRS

[root@felix2 bin]# ./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[root@felix1 bin]# ./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

(4)检查CRS状态

[root@felix2 bin]# ./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[root@felix2 bin]#

(5)破坏OCP内容

[root@felix2 bin]# ./ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     521836

Used space (kbytes)      :       3852

Available space (kbytes) :    517984

ID                       :  383273474

 Device/File Name         : /dev/raw/raw1

Device/Fileintegrity check succeeded

Device/Filenot configured

Cluster registry integrity check succeeded

[root@felix2 bin]#

[root@felix2 bin]# dd  if=/dev/zero   of=/dev/raw/raw1   bs=1024  count=102400

102400+0 records in

102400+0 records out

104857600 bytes (105 MB) copied, 143.294 seconds,732 kB/s

[root@felix2 bin]#

(6)检查OCR一致性

[root@felix1 bin]# ./ocrcheck

PROT-601: Failed to initialize ocrcheck

[root@felix1 bin]#

检查失败

(7)使用cluvfy工具检查一致性

[oracle@felix1 bin]$  ./cluvfy comp ocr  -n all

Verifying OCR integrity

Unable to retrieve nodelist from Oracleclusterware.

Verification cannot proceed.

[oracle@felix1 bin]$

检查相同失败

(8)使用import恢复OCR内容

[root@felix1 bin]# ./ocrconfig -import/u01/oracle/ocr_exp.exp

PROT-19: Cannot proceed while clusterware isrunning. Shutdown clusterware first

[root@felix1 bin]#

须要停止cluster

[root@felix1 bin]# ./crsctl stop crs

OCR initialization failed with invalid format:PROC-22: The OCR backend has an invalid format

[root@felix1 bin]#

重新启动OS:

Reboot

重新启动之后:

[root@felix1 bin]# ps -ef| grep d.bin

root     3852  2532  0 08:30 pts/1    00:00:00 grep d.bin

[root@felix1 bin]# ./ocrconfig -import/u01/oracle/ocr_exp.exp

[root@felix1 bin]# ps -ef| grep d.bin

oracle   4090  4089  1 08:32 ?        00:00:00/u01/oracle/10.2.0/crs_1/bin/evmd.bin

root     4260  3061  3 08:32 ?        00:00:00/u01/oracle/10.2.0/crs_1/bin/crsd.bin reboot

root     4693  4267  0 08:32 ?

00:00:00 /u01/oracle/10.2.0/crs_1/bin/oprocd.binrun -t 1000 -m 500 -f

root     4737  2532  0 08:32 pts/1    00:00:00 grep d.bin

[root@felix1 bin]#

启动crs然后检查crs资源状态:

[root@felix2 bin]# ./crs_stat  -t

Name          Type           Target    State    Host

------------------------------------------------------------

ora.felix.db  application    ONLINE    ONLINE   felix1

ora....x1.inst application    ONLINE   ONLINE    felix1

ora....x2.inst application    ONLINE   ONLINE    felix2

ora....SM1.asm application    ONLINE   ONLINE    felix1

ora....X1.lsnr application    ONLINE   ONLINE    felix1

ora.felix1.gsd application    ONLINE   ONLINE    felix1

ora.felix1.ons application    ONLINE   ONLINE    felix1

ora.felix1.vip application    ONLINE   ONLINE    felix1

ora....SM2.asm application    ONLINE   ONLINE    felix2

ora....X2.lsnr application    ONLINE   ONLINE    felix2

ora.felix2.gsd application    ONLINE   ONLINE    felix2

ora.felix2.ons application    ONLINE   ONLINE    felix2

ora.felix2.vip application    ONLINE   ONLINE    felix2

[root@felix2 bin]#

资源所有是ok的。

(9)再次检查OCR状态

[root@felix2 bin]# ./ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     521836

Used space (kbytes)      :       3852

Available space (kbytes) :    517984

ID                       :1105086789

Device/File Name         :/dev/raw/raw1

Device/Fileintegrity check succeeded

Device/Filenot configured

Cluster registry integrity check succeeded

[root@felix2 bin]#

(11)通过cluvfy工具检查

[oracle@felix2 bin]$ ./cluvfy comp crs -n all

Verifying CRS integrity

Checking CRS integrity...

Checking daemon liveness...

Liveness check passed for "CRS daemon".

Checking daemon liveness...

Liveness check passed for "CSS daemon".

Checking daemon liveness...

Liveness check passed for "EVM daemon".

Checking CRS health...

CRS health check passed.

CRS integrity check passed.

Verification of CRS integrity was successful.

[oracle@felix2 bin]$

(12)检查crs

[oracle@felix2 bin]$ ./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[oracle@felix2 bin]$

【參考于大话RAC--张晓明】

使用导入导出进行备份和恢复OCR(10g)的更多相关文章

  1. MongoDB学习(三)数据导入导出及备份恢复

    这几天想着公司要用MongoDB,自然就要用到数据导入导出,就自己学习了一下. 在Mongo学习(二)中就讲到了在bin目录下有一些工具,本篇就是使用这些工具进行数据的导入导出及备份恢复. 注意:以下 ...

  2. oracle中导入导出数据备份数据库

    原文:oracle中导入导出数据备份数据库 数据库所在位置                         将数据导出到的文件名                    用户名 备份数据库 :exp c ...

  3. mysql数据库的基本操作:索引、视图,导入和导出,备份和恢复

    1.索引: 索引是一种与表有关的结构,它的作用相当于书的目录,可以根据目录中的页码快速找到所需的内容. 当表中有大量记录时,若要对表进行查询,没有索引的情况是全表搜索:将所有记录一一取出,和查询条件进 ...

  4. 如何在oracle中导入导出(备份&恢复)dmp数据库文件

    Oracle数据导入导出imp/exp就相当于oracle数据还原与备份.exp命令可以把数据从远程数据库服务器导出到本地的dmp文件,imp命令可以把dmp文件从本地导入到远处的数据库服务器中. 利 ...

  5. MySQL数据库(表)的导入导出(备份和还原)

    一)在同一个数据库服务器上面进行数据表间的数据导入导出: 1. 如果表tb1和tb2的结构是完全一样的,则使用以下的命令就可以将表tb1中的数据导入到表tb2中: insert into db2.tb ...

  6. 【原创】MySql 数据库导入导出(备份)

    啥不说了,两周前刚刚做过mysql导入导出的结果现在又忘了.. 更可悲的是竟然同样的三篇blog,现在看起来还是如当初一样费劲,里面的内容..所以自己写个记录一下 环境:*nix 权限:有相关表的写读 ...

  7. Oracle数据库导入导出(备份还原)

    一.数据库的导出 1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中(全库导出) exp system/manager@TEST file=d:\ ...

  8. 11g RAC OCR,VOTING DISK存储全部损坏,利用自动备份,恢复OCR,VOTING DISK到新存储。

    背景: 11g R2 rac 的orc ,voting disk asm存储磁盘全部损坏.通过调查得知 损坏的 OCR磁盘对应为 VOL1 ,voting disk磁盘对应于 VOL2 . 故,添加a ...

  9. mongodb数据导入导出以及备份恢复

    昨日在公司收到游戏方发来一个1G多的数据文件,要求导入联运账号中.细细一看,纳尼!文件竟然是BSON格式. 哇塞,这不是去年给大家分享的NoSql中的MongoDB的备份文件吗? 于是搭好环境 1.启 ...

随机推荐

  1. storm入门教程 第一章 前言[转]

    1.1   实时流计算 互联网从诞生的第一时间起,对世界的最大的改变就是让信息能够实时交互,从而大大加速了各个环节的效率.正因为大家对信息实时响应.实时交互的需求,软件行业除了个人操作系统之外,数据库 ...

  2. webdriver(python)学习笔记二

    自己开始一个脚本开始学习: # coding = utf-8 from selenium import webdriver browser = webdriver.Firefox() browser. ...

  3. FOJ2022车站 线段树区间合并

    http://acm.fzu.edu.cn/problem.php?pid=2022 刚开始MLE,用map对应,果断爆内存了,然后改用去重,离散化, lowbound查找元素位置,速度还不错,不过p ...

  4. 【C++对象模型】函数返回C++对象的问题

    在深入C++对象模型中,对于形如 CObj obj1 = Get(obj2); 的形式,编译器会在将其改变为如下 Get(obj, CObj&  obj1); 将赋值操作符左边的变量作为函数的 ...

  5. Visual Assist X 破解步骤

    1. 下载VA安装包,并点击exe文件安装(附下载地址:http://down.51cto.com/data/766817) 2. 将Visual Assist X Patch文件复制到C:\User ...

  6. 关于Noise and Error主题的一些小知识

    (一)Noise会不会对VC bound产生影响? 此笔记源于台湾大学林轩田老师<机器学习基石><机器学习技法> 答案是不会. 当信号中加入了Noise,其实对我们之前学过的内 ...

  7. J2SE7规范_2013.2_类

    8.1 类的定义   包括普通类和枚举类,枚举(略) 下面都是指普通类:   public只能用于外部类,成员类,不能用于局部类,匿名类 protected和private用于成员类时(待解) sta ...

  8. 产品经理如何赢得开发人员的尊重和支持?-摘自infoq

    对于产品经理来说,赢得开发人员的尊重和支持,从某种意义上讲,是产品迈向成功的坚实一步.最近,知乎社区上的开发人员和管理者在前.后两个帖子中对此展开了激烈的讨论,其中不乏真知灼见. 林志霖Cray认为产 ...

  9. Hellow world!

    其实一年前开始就有了些许开篇技术博客的想法,一直觉得写这些的人都一定好牛×.现刚毕业,我也是时候朝牛×之路迈进了.当然,我才刚入门不久,前路漫漫,需一步一脚印,先打算把平常遇到的一些问题与关注的东西都 ...

  10. 利用phantomjs模拟QQ自动登录

    之前为了抓取兴趣部落里的数据,研究了下QQ自动登录. 当时搜索了一番,发现大部分方法都已经失效了,于是准备自己开搞. 第一个想到的就是参考网上已有方案的做法,梳理登陆js的实现,通过其他语言重写.考虑 ...