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

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. ZOJ - 3228 Searching the String (AC自己主动机)

    Description Little jay really hates to deal with string. But moondy likes it very much, and she's so ...

  2. Centos7/RedHat7 下 python3使用cx-freeze打包matplotlib程序遇到的问题和解决办法

    折腾了一天遇到了几个头疼的问题,还好回去前解决掉了 第一个:执行cxfreeze打包好的程序遇到 tkinter 和 _tkinter的缺失问题 首先终端:python tkinter python ...

  3. 【温故知新】——HTML5重要知识点复习

    前言:本文是自己在学习课程中的课程笔记,这里用来温故知新的,并非本人原创. 一.HTML5新特性 —— 十个新特性:凌乱 (1)新的语义标签 (2)增强型表单(表单2.0) (3)音频和视频 (4)C ...

  4. JavaScript中给二维数组动态添加元素的质朴方法

    var myData = new Array(); for(var i=0;i<tableDatas.length;i++){ var arr=tableDatas[i]; ...... /// ...

  5. linux 木马

    参考 http://wangzan18.blog.51cto.com/8021085/1740113 http://www.cnblogs.com/jluzhsai/p/3756280.html  ( ...

  6. zepto jquery和zepto的区别?

    jQuery 由于强大的生命力基本上是一个事实标准,所以大部分工具 lib 在 DOM 操作.动画等功能上或多或少都会是 jQuery-like 的. Zepto 的 API 就是完全兼容 jQuer ...

  7. Vue DOM事件

    本文参考自:https://mp.weixin.qq.com/s?src=3&timestamp=1527154113&ver=1&signature=tWGeTa86gyK* ...

  8. vue v-model使用说明

    1.概述 v-model 会忽略所有表单元素的 value.checked.selected 特性的初始值而总是将 Vue 实例的数据作为数据来源.你应该通过 JavaScript 在组件的 data ...

  9. 【Excle数据透视】如何用含有单元格的数据来创建数据透视

    取消合并单元格,填充相同内容项,然后创建数据透视表. 如下图:需要使用数据创建数据透视表 步骤一 开始→格式刷,然后对单元格区域G2:G15使用格式刷功能,保留合并单元格格式 步骤二 选中A2:A18 ...

  10. 一篇文章说完Java的垃圾回收过程

    想要了解java的垃圾回收过程首先要理解java堆的内存模型,简单表示如下:   从上面的图片可以看出,java的堆内存可以简单的分为,新生代和老年代,在新生代中有分为三个区域,1个Eden区和2个S ...