版权声明:本文为博主原创文章。未经博主同意不得转载。

https://blog.csdn.net/royjj/article/details/30506343



oracle 11g ocr 冗余配置

在11g 安装过程中默认仅仅能指定一个 dg 用来存储:crs ,voting
可是oracle 官方一般建议我们这么来配置:

1、当ocr没有配置镜像。或者冗余存储时 最少3个ocr 。
假设底层存储不是RAID的话,oracle建议镜像OCR,镜像能够避免单点故障。

■ At least two OCR locations if OCR is configured on an Oracle ASM disk group.
You should configure OCR in two independent disk groups. Typically this is the
work area and the recovery area.

2、假设ocr 配置在oracle asm disk group上时,建议最少两个ocr 位置
ocr 应当配置在两个单独的 disk group

■ At least two OCR locations if OCR is configured on mirrored hardware or
third-party mirrored volumes.

3、假设ocr 配置在有镜像的硬件或者在第3方的镜像卷上时也建议最少冗余2个ocr

eg:加入多个ocr (最多5个)
ocrconfig -add +asm_disk_group| file_name

ocrconfig -delete +ASM_disk_group| file_name

[root@vmrac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 ~]# ocrconfig -add +ARCH   --------------------------加入一个新的ocr   +ARCH

[root@vmrac1 ~]# ocrcheck                    ------------------------------检查后已经成功加入
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +ARCH
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

同理再加入几个 dg

[root@vmrac1 ~]# ocrconfig -add +DATANEW
[root@vmrac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +ARCH
                                    Device/File integrity check succeeded
         Device/File Name         :   +DATANEW
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 ~]# ocrconfig -add +FLASH
[root@vmrac1 ~]# orcheck
-bash: orcheck: command not found
[root@vmrac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +ARCH
                                    Device/File integrity check succeeded
         Device/File Name         :   +DATANEW
                                    Device/File integrity check succeeded
         Device/File Name         :     +FLASH
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +ARCH
                                    Device/File integrity check succeeded
         Device/File Name         :   +DATANEW
                                    Device/File integrity check succeeded
         Device/File Name         :     +FLASH
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 ~]# ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2728
         Available space (kbytes) :     259392
         ID                       :  935756415
         Device/File Name         : /u02/app/11.2.0.3/grid/cdata/vmrac1.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check succeeded

------------这里我们再来看下ocr 的配置信息 。配置文件在Linux环境下位于 /etc/oracle/ocr.loc

[root@vmrac1 ~]# cd /etc/oracle
[root@vmrac1 oracle]# ls
lastgasp  ocr.loc  ocr.loc.orig  olr.loc  olr.loc.bkp  olr.loc.orig  oprocd  scls_scr  setasmgid

[root@vmrac1 oracle]# more ocr.loc
#Device/file  getting replaced by device +FLASH
ocrconfig_loc=+CRS
ocrmirrorconfig_loc=+ARCH  ----------新加入的 ocr 镜像组 
ocrconfig_loc3=+DATANEW
ocrconfig_loc4=+FLASH
local_only=false

[root@vmrac1 oracle]# more olr.loc
olrconfig_loc=/u02/app/11.2.0.3/grid/cdata/vmrac1.olr
crs_home=/u02/app/11.2.0.3/grid

-----------这里处理加入新的ocr外,我们也能够替换老的 ocr dg:
[root@vmrac1 oracle]# ocrconfig -replace +ARCH -replacement +FLASH
[root@vmrac1 oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :     +FLASH
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 oracle]# ocrconfig -replace +FLASH -replacement +ARCH
[root@vmrac1 oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +ARCH
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 oracle]#

---------------------注意:当 仅仅有一个 ocr dg 时以上命令会报错:
[root@vmrac1 oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3540
         Available space (kbytes) :     258580
         ID                       : 1902812549
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

[root@vmrac1 oracle]# ocrconfig -replace  +CRS -replacement  +ARCH
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
[root@vmrac1 oracle]#

正确做法:
假设当前的ocr 少于2个 ,则上述ocr 的替换命令会出错
假设仅仅有一个ocr 时我们能够先加入一个ocr 。再删除原来的ocr

# ocrconfig -add new_OCR_location
# ocrconfig -delete current_OCR_location

oracle 11g ocr 冗余配置的更多相关文章

  1. Oracle 11g R2手动配置EM(转)

    转自:http://blog.itpub.net/9034054/viewspace-1973418/ Oracle 11g R2手动配置EM Oracle 作者:luashin 时间:2016-01 ...

  2. Oracle 11g R2 常用配置与日志的文件位置

    假设.bash_profile中oracle相关环境变量如下: $ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 $ORACLE_BASE=/u01/a ...

  3. Oracle 11g详细安装配置教程

    最近开始学习Oracle数据库了,根据我的理解Oracle数据库是一种强大.复杂.高性能的数据库,而且价格不菲,使用都是中大型企业,土豪专用.学习一种数据库的入门工作就是先安装这种数据库,鉴于大批道友 ...

  4. Linux 6.x 下Oracle 11g R2 安装配置

    Oracle 11g R2 数据库安装硬件配置要求: 最小内存 1 GB of RAM 虚拟内存容量,这个oracle也有要求,不用担心此时的swap分区不够oracle的要求 .虚拟内存swap如何 ...

  5. 静默安装oracle 11g及参数配置优化详解

    一.安装前准备工作1.修改主机名#vi /etc/hosts   //并添加内网IP地址对应的hostname,如下127.0.0.1           localhost::1           ...

  6. oracle 11g Enterprise Manager配置失败

    Enterprise Manager以下简称em,Database Configuration Assistant简称DBCA. 病症 监听程序未启动或数据库服务未注册到该监听程序.启动该监听程序并注 ...

  7. centOS学习part5:oracle 11g安装之环境准备

    0 前几篇依次向大家介绍了centOS的基本安装以及常用软件的安装配置,接下来我们将挑战的是oracle 11g的安装配置.与之前安装的软件不一样的是,由于oracle并非开源免费软件(需要向orac ...

  8. ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1

    博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...

  9. Linux平台oracle 11g单实例 安装部署配置 快速参考

    1.重建主机的Oracle用户 组 统一规范 uid gid 以保证共享存储挂接或其他需求的权限规范 userdel -r oracle groupadd -g 7 oinstall groupadd ...

随机推荐

  1. UIView的任意圆角

    今天在做项目的时候,遇到一个问题,grouped类型的tableview 怎么样才能让他们的一个view 其中一个角圆角? 如上图所示,其实我是用UILabel,但是箭头的位置总是尖的不太好看.设置l ...

  2. supervisor启动sqlmapapi失败 sqlmapapi: ERROR (file is not executable)

    问题:在使用supervisor管理sqlmapapi的时候,启动的时候报错: sqlmapapi: ERROR (file is not executable) 解决办法:sudo supervis ...

  3. Android蓝牙开发教程(三)——蓝牙设备相互通讯

    在上一篇中已经介绍如何连接我们搜索到的蓝牙设备,如果你还没阅读过,建议先看看上一篇文章Android蓝牙开发教程(二)——连接蓝牙设备 在上一篇文章中,无论是自动连接还是被动连接,连接成功后,都是将获 ...

  4. 【GLSL教程】(八)纹理贴图 【转】

    http://blog.csdn.net/racehorse/article/details/6664717 简单的纹理贴图(Simple Texture) 为了在GLSL中应用纹理,我们需要访问每个 ...

  5. 又一次遇到Data truncation: Data too longData truncation: Data too long问题

    往MySQL的blob字段上传文件,结果又出现了Data truncation: Data too longData truncation: Data too long异常. 我的第一反应是查看/et ...

  6. CNN卷积神经网络新想法

    近期一直在看卷积神经网络,想改进改进弄出点新东西来.看了好多论文,写了一篇综述.对深度学习中卷积神经网络有了一些新认识,和大家分享下. 事实上卷积神经网络并非一项新兴的算法.早在上世纪八十年代就已经被 ...

  7. iOS - 贝塞尔曲线,折线,曲线,波浪线

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZHlsYW5fbHdiXw==/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...

  8. Node.js学习笔记(3)——关于回调函数和函数的回调

    说明:本人是node.js的初学者,尝试向别人解释这是怎么回事是自我学习的一个好方法.如果你发现有些地方并不是那么正确,欢迎提出来让我知道以便修正,共同进步,谢过^_^.       欢迎交流,本人微 ...

  9. 如何禁止同IP站点查询和同IP站点查询的原理分析 Robots.txt屏蔽BINGBOT

    很多站长工具中都有“同IP站点查询”.“IP反查域名”这种服务不少人都不知道是什么原理,其实这些服务几乎都是用BING(以前的LIVE)来实现 的,BING有个特别功能 BING抓取页面时会把站点的I ...

  10. 用Putty连接Linux

    随着linux应用的普及,linux管理越来越依赖远程管理.在各种telnet类工具中,putty是其中最出色的一个. 一.Putty简介     Putty是一个免费小巧的Win32平台下的teln ...