oracle 11g ocr 冗余配置



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

[[email protected] ~]# 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

[[email protected] ~]# ocrconfig -add +ARCH   --------------------------添加一个新的ocr   +ARCH

[[email protected] ~]# 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

[[email protected] ~]# ocrconfig -add +DATANEW

[[email protected] ~]# 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

[[email protected] ~]# ocrconfig -add +FLASH

[[email protected] ~]# orcheck

-bash: orcheck: command not found

[[email protected] ~]# 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

[[email protected] ~]# 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

[[email protected] ~]# 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

[[email protected] ~]# cd /etc/oracle

[[email protected] oracle]# ls

lastgasp  ocr.loc  ocr.loc.orig  olr.loc  olr.loc.bkp  olr.loc.orig  oprocd  scls_scr  setasmgid

[[email protected] 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

[[email protected] 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:

[[email protected] oracle]# ocrconfig -replace +ARCH -replacement +FLASH

[[email protected] 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

[[email protected] oracle]# ocrconfig -replace +FLASH -replacement +ARCH

[[email protected] 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

[[email protected] oracle]#

---------------------注意:当 只有一个 ocr dg 时以上命令会报错:

[[email protected] 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

[[email protected] oracle]# ocrconfig -replace  +CRS -replacement  +ARCH

PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location

[[email protected] oracle]#

正确做法:

如果当前的ocr 少于2个 ,则上述ocr 的替换命令会出错

如果只有一个ocr 时我们可以先添加一个ocr ,再删除原来的ocr

# ocrconfig -add new_OCR_location

# ocrconfig -delete current_OCR_location

oracle 11g ocr 冗余配置

时间: 2024-12-18 07:44:04

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

Oracle 11g安装和配置教程(图解)-linux

1.安装规划 网络规划: IP: xxxx   --静态IP 目录规划 ORACLE_BASE:   /oracle/app            --可自行修改  软件目录 ORACLE_HOME   /oracle/app/db     --可自行修改 产品目录 ORACLE_SID:vicdb 2.创建用户和组 [[email protected] ~]# groupadd oinstall [[email protected] ~]# groupadd dba [[email prote

Oracle 11g安装和配置教程(图解)-win7 64位

1. 下载Oracle 11g R2 for Windows的版本,官方网站下载地址如下: http://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_1of2.zip http://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_2of2.zip 2. 解压两个压缩包到同一目录(同一文件夹中),即"database",然

Oracle 11g详细安装配置教程

最近开始学习Oracle数据库了,根据我的理解Oracle数据库是一种强大.复杂.高性能的数据库,而且价格不菲,使用都是中大型企业,土豪专用.学习一种数据库的入门工作就是先安装这种数据库,鉴于大批道友安装时出现问题,特将我安装数据库的流程做成详细的图文教程. 材料:Oracle 11g 下载地址:http://pan.baidu.com/s/1c1vd3H2 根据电脑的位数解压对应的压缩包到同一个文件夹 点击解压好的文件中的setup.exe,下面开始进图详解  一.安装 我用的server20

redhat6.5部署oracle 11G R2 (参考配置)

安装过程中遇到的问题: 1.创建oracle用户时,最好指定家目录,常规的为/opt/oracle,默认的/home/oracle也是可以的. 2.在"添加主机名与IP地址对应"一步中,一定要配置对IP,不然安装过程中会出现"Oracle Net Configuration Assisant failed"的错误 RHEL6.5安装部署Oracle 11g R2数据库 实验环境      虚拟机版本 VM12 pro 操作系统 RedHat-6.5-x86_64 主

oracle 11g r2 一键配置脚本

最近工作需要安装oracle 11g R2在阿里云ECS上,因此编写了一个脚本来完成图形化安装界面之前的准备工作,这样节省时间,shell如下: #!/bin/bash SYSCTL="/etc/sysctl.conf" LIMITS="/etc/security/limits.conf" PAM="/etc/pam.d/login" PROFILE="/etc/profile" BASH_PROFILE="/hom

RHEL 6.8 + Oracle 11g RAC multipath 配置

Oracle 11g RAC + RHEL 6.8 多路径配置如下,仅供参考. <roidb1:+ASM1:/etc/udev/rules.d>$ls 12-dm-permissions.rules 60-pcmcia.rules 90-alsa.rules 98-kexec.rules 55-usm.rules 60-raw.rules 90-hal.rules 99-fuse.rules 60-fprint-autosuspend.rules 70-persistent-net.rules

阿里云上Oracle 11g RAC安装配置手册

有印象的用户可能发现,阿里云早在2016年深圳云栖大会就官方发布了对Oracle RAC的支持,但是相关产品却一直没能同步推出,相信大家都翘首以盼了许久许久.一个好消息是,近期阿里云将紧密推出两款新产品:共享块存储和ECS多网卡.这两款产品将打通众多关键云下应用上云的最后一公里,为用户提供更多的便利.在我们能正式体验到新产品之前,阿里云技术服务团队也将云上的Oracle RAC安装配置手册放出,希望能给大家提供更多不同的体验和选择. 一.安装说明 阿里云上Oracle RAC的安装部署,重点需要

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

一.安装前准备工作1.修改主机名#vi /etc/hosts   //并添加内网IP地址对应的hostname,如下127.0.0.1           localhost::1                   localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.8.151          linux-test 2.修改standby数据库的/etc/sysconfig/iptables文件,

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

0 前几篇依次向大家介绍了centOS的基本安装以及常用软件的安装配置,接下来我们将挑战的是oracle 11g的安装配置.与之前安装的软件不一样的是,由于oracle并非开源免费软件(需要向oracle购买授权,但是个人学习的话可以直接到官网下载安装学习),所以不能直接通过yum简单的来完成安装,需要很多的准备工作,下面我将一一向大家介绍,希望对初学者有所参考.由于整个内容比较多,我将其分为几个部分,大家可以分开查看.本章将要介绍的就是oracle 11g安装之前的系统环境准备. [请注意,本