使用导入导出进行备份和恢复OCR(10g)
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)的更多相关文章
- MongoDB学习(三)数据导入导出及备份恢复
这几天想着公司要用MongoDB,自然就要用到数据导入导出,就自己学习了一下. 在Mongo学习(二)中就讲到了在bin目录下有一些工具,本篇就是使用这些工具进行数据的导入导出及备份恢复. 注意:以下 ...
- oracle中导入导出数据备份数据库
原文:oracle中导入导出数据备份数据库 数据库所在位置 将数据导出到的文件名 用户名 备份数据库 :exp c ...
- mysql数据库的基本操作:索引、视图,导入和导出,备份和恢复
1.索引: 索引是一种与表有关的结构,它的作用相当于书的目录,可以根据目录中的页码快速找到所需的内容. 当表中有大量记录时,若要对表进行查询,没有索引的情况是全表搜索:将所有记录一一取出,和查询条件进 ...
- 如何在oracle中导入导出(备份&恢复)dmp数据库文件
Oracle数据导入导出imp/exp就相当于oracle数据还原与备份.exp命令可以把数据从远程数据库服务器导出到本地的dmp文件,imp命令可以把dmp文件从本地导入到远处的数据库服务器中. 利 ...
- MySQL数据库(表)的导入导出(备份和还原)
一)在同一个数据库服务器上面进行数据表间的数据导入导出: 1. 如果表tb1和tb2的结构是完全一样的,则使用以下的命令就可以将表tb1中的数据导入到表tb2中: insert into db2.tb ...
- 【原创】MySql 数据库导入导出(备份)
啥不说了,两周前刚刚做过mysql导入导出的结果现在又忘了.. 更可悲的是竟然同样的三篇blog,现在看起来还是如当初一样费劲,里面的内容..所以自己写个记录一下 环境:*nix 权限:有相关表的写读 ...
- Oracle数据库导入导出(备份还原)
一.数据库的导出 1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中(全库导出) exp system/manager@TEST file=d:\ ...
- 11g RAC OCR,VOTING DISK存储全部损坏,利用自动备份,恢复OCR,VOTING DISK到新存储。
背景: 11g R2 rac 的orc ,voting disk asm存储磁盘全部损坏.通过调查得知 损坏的 OCR磁盘对应为 VOL1 ,voting disk磁盘对应于 VOL2 . 故,添加a ...
- mongodb数据导入导出以及备份恢复
昨日在公司收到游戏方发来一个1G多的数据文件,要求导入联运账号中.细细一看,纳尼!文件竟然是BSON格式. 哇塞,这不是去年给大家分享的NoSql中的MongoDB的备份文件吗? 于是搭好环境 1.启 ...
随机推荐
- ORACLE临时表总结[转]
临时表概念 临时表就是用来暂时保存临时数据(亦或叫中间数据)的一个数据库对象,它和普通表有些类似,然而又有很大区别.它只能存储在临时表空间,而非用户的表空间.ORACLE临时表是会话或事务级别的,只对 ...
- IOS 本地通知UILocalNotification
//发送通知 UILocalNotification *notification=[[UILocalNotification alloc] init]; if (notificati ...
- char[]数组与char *指针的区别
char[]数组与char *指针的区别 问题描述 虽然很久之前有看过关于char指针和char数组的区别,但是当时没有系统的整理,到现在频繁遇到,在string,char[], char *中迷失了 ...
- 我喜欢的乐队-Euphoria
来自日本的后摇乐团,001年冬天由森川裕之.佐藤昭太.木下阳辅三人于东京组建,2003年签约日本独立厂牌123Record,并发行首张EP细碟<Floral Dew>.包括EP.Singl ...
- sublime text2中ctags安装问题的解决
其实按照http://blog.csdn.net/xiao_qiang_/article/details/9074557基本可以安装好,不过我还是遇到了问题.说一下我如何解决在MAC上安装时的奇葩问题 ...
- php环境配置中各个模块在网站建设中的功能
上一篇配置环境的时候,我们注意到,有四个模块需要配置,那么,这四个模块分别有哪些功能呢? 一.php php是我们的用来创建动态网页的强有力的脚本语言,安装过程中我们直接解压到某一个路径就好了,比 ...
- fork之后发生了什么(基于3.16-rc4)
在linux c编程中,我们可以使用fork,vfork,clone三个系统调用来创建子进程.下面我们先分析下fork系统调用的实现原理.代码如下(kernel/fork.c): #ifdef __A ...
- 现代程序设计 homework-07
现代程序设计 homework-07 这次作业是要阅读C++11的新特性,按照老师blog提供的链接稍微学习了一下,一下就是一些学习总结(或者说就是介绍)之类的:由于英文能力有限,并且很多中文资料也都 ...
- Windows下cmd的替代软件——PowerCmd
Powercmd 是一款运行在windows下的cmd增强软件(A Better Command Prompt Replacement Tool),当前最新的版本为2.2. 官方提供试用版,貌似没有功 ...
- HiveContext VS SQLContext
There are two ways to create context in Spark SQL: SqlContext:scala> import org.apache.spark.sql. ...