设为首页 加入收藏

TOP

使用导入导出进行备份和恢复OCR(10g)(一)
2015-07-24 11:44:13 来源: 作者: 【 】 浏览:6
Tags:使用 导入 导出 进行 备份 恢复 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]# ddif=/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

Na

首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇oracle恢复案例:rename一个数据.. 下一篇OracleErrorStack使用和阅读详解

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·【超详细】JDK 下载 (2025-12-24 18:19:32)
·Java_百度百科 (2025-12-24 18:19:29)
·简介 - Java教程 - (2025-12-24 18:19:27)
·C++ 语言社区-CSDN社 (2025-12-24 17:48:24)
·CSDN问答专区社区-CS (2025-12-24 17:48:22)