使用导入导出进行备份和恢复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.启 ...
随机推荐
- 修复duilib库UISlider控件的4个bug
转载级请注明原出处,谢谢~· 昨天封装好一个音频类,我在为dulib做音频播放demo时发现了一些问题,由CSliderUI控件导致的,进而发现了这个控件的好几样不足,他无法满 足我们做一个播放器的进 ...
- C++11 Concurrency Features
Concept Header Summary Threads <thread> Standard, low-level, type-safe; ...
- 查看linux服务器中的apache是否安装以及安装路径
1.可以通过 apachectl -v 查看apache是否安装,如果安装了的话会显示版本号: 2.如果通过rpm包安装的话可以用 rpm -q httpd 查看,如果安装的的话会显示包的名称
- 自学hadoop(二)
1)NameNode为主 DataNode为从 2)JobTracker为主 TaskTracker为从 3)开启调试模式 export HADOOP_ROOT_LOGGER=DEBUG,conso ...
- 初识MFC,WinForm,WPF,Q't
MFC和QT是C++中常见的GUI框架,而WinForm和WPF是C#中常用的框架,不过我们一般很少叫WinForm框架,可能直接叫图形控件类库更多点.反正只是个称呼罢了,爱咋叫就咋叫.另外WinFo ...
- well-posed problem and ill-posed problem
well-posed problem must have the property that A solution exists The solution is unique The solution ...
- Hbase 基本命令
启动Hbase:./start-hbase.sh 进入Hbase shell控制台:./hbase shell 查看所有表 list 查看数据库状态:status 查看数据库版本:vers ...
- HTML5每日一练之input新增加的六种时间类型应用
今天介绍一下input在HTML5中新增加的时间类型的应用,与昨天的练习一样,如果在以下这几种输入框中输入的格式不正确,也是无法提交的. 注意:此种类型的input在Opera10+中效果为佳,Chr ...
- CodeForces 689E Mike and Geometry Problem (离散化+组合数)
Mike and Geometry Problem 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/I Description M ...
- mysql从一个表中拷贝数据到另一个表中sql语句
这一段在找新的工作,今天面试时,要做一套题,其中遇到这么一句话,从一个表中拷贝所有的数据到另一个表中的sql是什么? 原来我很少用到,也没注意过这个问题,面试后我上网查查,回来自己亲手写了写,测试了下 ...