Oracle RAC迁移OCR(10g)
Oracle RAC 添加和删除OCR 参考:http://www.zzzyk.com/database/201303/197136.html
Oracle RAC 备份和恢复OCR 参考:http://www.zzzyk.com/database/201303/196370.html
如果想要改变一个已经存在的ocr位置或改变一个已经出现故障的ocr位置,那么你就可以使用下面的过程来迁移ocr。
1.查看当前ocr情况
[plain]
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw7
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw8
Device/File integrity check succeeded
Cluster registry integrity check succeeded
这里raw7为普通ocr,raw8为镜像ocr
2.在Oracle clusterware 运行的节点上执行如下命令:
[plain]
[oracle@node1 crs_1]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
3.迁移普通ocr
[plain]
[root@node1 bin]# ./ocrconfig -replace ocr /dev/raw/raw9
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw9
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw8
Device/File integrity check succeeded
Cluster registry integrity check succeeded
可以看到此时raw9已为普通ocr而非raw7
4.迁移镜像ocr
[plain]
[root@node1 bin]# ./ocrconfig -replace ocrmirror /dev/raw/raw7
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw9
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw7
Device/File integrity check succeeded
Cluster registry integrity check succeeded
可以看到此时raw7为镜像ocr而非raw8
5.如果做ocr迁移的时候有节点关闭,那么在启动关闭的节点后应该在这个节点上执行如下命令:
ocrconfig -repair