使用导入导出进行备份和恢复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.启 ...
随机推荐
- iframe 透明
iframe是迫不得已才使用的,因为使用iframe会带来较多的问题,而有的浏览器可以设置将iframe当作广告屏蔽. 在最近的一个工作内容中使用了iframe,开始遇到的问题是iframe高度自适应 ...
- Codeforces Round #363
http://codeforces.com/contest/699 ALaunch of Collider 题意:n个球,每个球向左或右,速度都为1米每秒,问第一次碰撞的时间,否则输出-1 贪心最短时 ...
- 在Ubuntu6.06 在搭建SVN服务器及在windows建立svn+ssh客户端
部门现在使用的Linux系统是Ubuntu6.06,内核版本为2.6.15-57-386.由于系统比较老,所有用网上介绍的方法搭建SVN服务器经常出错,所以参考文章[1],将自己的搭建过程记录下. 1 ...
- VSim [a Racing-simulator by Vell001]
VSim [a racing-simulator by vell001] This is my first project about Racing. I am a Chinese with bad ...
- ActiveReport资料
1. ActiveReports for .NET 2 Online | ActiveReports for .NET 3 Online 2.GroupHeader块 ①GroupHeader块为每个 ...
- IOS下arm64汇编疑问
之前所有关于32位下的纯汇编.s代码,在编译arm64的时候,很多错误,不得已只能用C代码. 但是arm_neon.h内部类C接口的汇编,基本上没有问题.不敢完全保证,还有待确认.关于arm64位的汇 ...
- 学习使用Markdown标记语言
学习如何使用Markdown进行文本编辑 使用教程 大家若是经常逛Github,就知道其中有一个文件叫做README.MD.我一开始也不知道这个.MD是什么意思,后来我自己写了一次,就知道了这一种 ...
- [iOS 多线程 & 网络 - 1.0] - 多线程概述
A.进程 什么是进程进程是指在系统中正在运行的一个应用程序 每个进程之间是独立的,每个进程均运行在其专用且受保护的内存空间内 比如同时打开QQ.Xcode,系统就会分别启动2个进程 通过"活 ...
- CodeForces 707A Brain's Photos (水题)
题意:给一张照片的像素,让你来确定是黑白的还是彩色的. 析:很简单么,如果有一种颜色不是黑白灰,那么就一定是彩色的. 代码如下: #pragma comment(linker, "/STAC ...
- java应用CPU占用率过高问题的分析
使用top查询哪个进程占用CPU过高 查看CPU占用高的进程中,哪个线程占用CPU高 可通过以下三种方式查看: 1 top中按SHIFT+H查找哪个线程占用高 2 top -H -p PID命令查看哪 ...