Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2886856
  • 博文数量: 599
  • 博客积分: 16398
  • 博客等级: 上将
  • 技术积分: 6875
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-30 12:04
个人简介

WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606

文章分类

全部博文(599)

文章存档

2014年(12)

2013年(56)

2012年(199)

2011年(105)

2010年(128)

2009年(99)

分类: Oracle

2010-03-19 11:16:14

OCR记录节点成员的配置信息,如ASM、instance、listener、VIP等CRS资源的配置信息
检查OCR的状态
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded
[root@node3 ~]# cat /etc/oracle/ocr.loc
#Device/file /dev/raw/raw4 being deleted
ocrconfig_loc=/dev/raw/raw2
local_only=false
 
增加一个镜像
 
[root@node3 ~]# ocrconfig -replace ocrmirror /dev/raw/raw4
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw4
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
[root@node3 ~]# cat /etc/oracle/ocr.loc
#Device/file  getting replaced by device /dev/raw/raw4
ocrconfig_loc=/dev/raw/raw2
ocrmirrorconfig_loc=/dev/raw/raw4
local_only=false

[root@node3 ~]# ocrconfig -replace ocrmirror /dev/raw/raw6
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw6
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
[root@node3 ~]# cat /etc/oracle/ocr.loc
#Device/file /dev/raw/raw4 getting replaced by device /dev/raw/raw6
ocrconfig_loc=/dev/raw/raw2
ocrmirrorconfig_loc=/dev/raw/raw6
local_only=false
OCR只能有一份镜像,新增加的镜像文件会替换掉原来的镜像。

删除OCR的镜像文件
 
[root@node3 ~]# ocrconfig -replace ocrmirror   ---不带文件路径名
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded
[root@node3 ~]# cat /etc/oracle/ocr.loc
#Device/file /dev/raw/raw6 being deleted
ocrconfig_loc=/dev/raw/raw2
local_only=false
 

注意如果我们删除了OCR的主文件,相应的镜像文件自动的变为主文件。
例如:
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw4
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
[root@node3 ~]# ocrconfig -replace ocr
[root@node3 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     208656
         Used space (kbytes)      :       6496
         Available space (kbytes) :     202160
         ID                       :  844916878
         Device/File Name         : /dev/raw/raw4
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded
 
阅读(1948) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~