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. [Everyday Mathematics]20150120

    设 $f:\bbR\to\bbR$ 二阶可微, 且 $$\bex f(0)=2,\quad f'(0)=-2,\quad f(1)=1. \eex$$ 试证: $$\bex \exists\ \xi\ ...

  2. codeforces 680E Bear and Square Grid 巧妙暴力

    这个题是个想法题 先预处理连通块,然后需要用到一种巧妙暴力,即0变1,1变0,一列列添加删除 复杂度O(n^3) #include <cstdio> #include <iostre ...

  3. 【LeetCode 207】Course Schedule

    There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prer ...

  4. Linux操作系统上用数据泵导库

    1.在Linux上 创建物理目录dp_dir,存放数据库.dmp文件: 用root用户登录,切换到oracle用户,用oralce身份创建物理目录如下: [root@server36 oracle]# ...

  5. VC++6.0 MFC播放视频

    注:需要在windows xp下才可以使用Windows Media Player插件,在windows 7下面会找不到该插件. 1.Windows Media Player控件的主要方法: 1)Ge ...

  6. cocos2d-x知识巩固-基础篇(2)

    上一篇博客介绍了整个cocos2dx引擎需要掌握的各个模块,每一个模块实际上往深了研究都有难点,后面我会详细地去分析它的用法.今天我们从第一个模块说起,即渲染模块.首先,为了理解,我们做个类比,说明该 ...

  7. linux 用 SSH2协议远程连接并控制 linux

    [参考链接](http://php.net/manual/zh/ssh2.installation.php) ssh2_exec 并不能打印所有的命令的提示信息 如果有返回的字符串信息,可以打印,或重 ...

  8. 1.2……初识Android开发

    Android体系结构 Dalvik VM(Android下的java虚拟机)与传统的JVM的区别 传统JVM 基于堆栈的架构 编写.java文件--->编译为.class文件--->打包 ...

  9. 关于自然常数e的理解

    关于自然常数\(e\)的理解 By Z.H. Fu 切问录 ( http://www.fuzihao.org ) 利息增长模型 在上中学学习对数的时候,我们就学到了一个叫做e的东西(\(e\appro ...

  10. android开发关于popupwindow显示关闭的笔记

    一.方法一: popupWindow.setFocusable(false); //这样popupWindow无法获得焦点,无法处理popupWindow中的事件 设置MainActivity的onT ...