在配置DG broker之前需要确保Dataguard配置正常且主库和备库均使用spfile.

1. 主库配置

  • 配置DG_BROKER_START参数

检查主库dg_broker_start设置

SQL> show parameter dg_broker_start;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

dg_broker_start boolean FALSE

启用dg_broker_start,启用后oracle会自动启动一个dmon进程

SQL> alter system set dg_broker_start = true;

System altered.

  • 在监听文件中加入DGMGRL静态监听

修改listener.ora文件,加入DGMGRL静态监听:SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = ora11db)

(ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1)

(SID_NAME = ora11db)

)

(SID_DESC =

(GLOBAL_DBNAME = ora11db_DGMGRL)

(ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1)

(SID_NAME = ora11db)

)

)

重启监听$> lsnrctl reload

2. 备库配置

  • 配置DG_BROKER_START参数

检查主库dg_broker_start设置

SQL> show parameter dg_broker_start;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

dg_broker_start boolean FALSE

启用dg_broker_start,启用后oracle会自动启动一个dmon进程

SQL> alter system set dg_broker_start = true;

System altered.

  • 在监听文件中加入DGMGRL静态监听

修改listener.ora文件,加入DGMGRL静态监听:

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = ora11sty)

(ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1)

(SID_NAME = ora11sty)

)

(SID_DESC =

(GLOBAL_DBNAME = ora11sty_DGMGRL)

(ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1)

(SID_NAME = ora11sty)

)

)

重启监听:

$> lsnrctl reload

3.配置broker

  • 创建dg broker

启动dgmgrl命令行

oracle@solora11g:~ $> dgmgrl sys/manager

DGMGRL for Solaris: Version 11.2.0.1.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.

Connected.

创建dg broker配置

DGMGRL> create configuration 'DGORA11G' as primary database is 'ora11db' connect identifier is ora11db;

Configuration "DGORA11G" created with primary database "ora11db"

显示配置信息

DGMGRL> show configuration

Configuration - DGORA11G

Protection Mode: MaxPerformance

Databases:

ora11db - Primary database

Fast-Start Failover: DISABLED

Configuration Status:

DISABLED

  • 增加备库设置

增加备库

DGMGRL> add database 'ora11sty' as connect identifier is 'ora11sty' maintained as physical;

Database "ora11sty" added

显示配置

DGMGRL> show configuration

Configuration - DGORA11G

Protection Mode: MaxPerformance

Databases:

ora11db - Primary database

ora11sty - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

DISABLED

  • enable配置

启用配置

DGMGRL> enable configuration

Enabled.

显示配置

DGMGRL> show configuration

Configuration - DGORA11G

Protection Mode: MaxPerformance

Databases:

ora11db - Primary database

ora11sty - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

4. 测试switchover

DGMGRL> switchover to ora11sty

Performing switchover NOW, please wait...

New primary database "ora11sty" is opening...

Operation requires shutdown of instance "ora11db" on database "ora11db"

Shutting down instance "ora11db"...

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

Operation requires startup of instance "ora11db" on database "ora11db"

Starting instance "ora11db"...

ORACLE instance started.

Database mounted.

Switchover succeeded, new primary is "ora11sty"

Oracle11g 配置DG broker的更多相关文章

  1. Oracle RAC 11g DG Broker配置和测试

    Oracle RAC 11g DG Broker配置和测试 之前在<RHEL6.4 + Oracle 11g DG测试环境快速搭建参考>已经简单说过. 本篇在实验环境中实际配置 环境: R ...

  2. 由于DG Broker的配置导致RAC某实例无法mount

    今天碰到一个我自己实验室发生的故障,起初看起来很简单,但实际上还很有趣,而且不细心的话还容易被忽视掉.相信在生产环境也会有客户会实际遇到. 环境:Oracle 11.2.0.4 RAC (2 node ...

  3. Oracle11g RAC+DG搭建

    项目环境准备 3.1虚拟机配置 版本选择 注意Linux操作系统.此次项目我选择的版本是Oracle Enterprise Linux 5.4 内存的设置 本人电脑物理内存8G,由于此次实验要开三台虚 ...

  4. Oracle11g 配置 ST_GEOMETRY

    安装环境:ArcGIS Desktop10.2.1 .ArcSDE10.2.134940. Oracle11.2.0.1 操作系统:Windows Server 2012R2 DataCenter 安 ...

  5. 配置dg出现的错误

    ORA-09925: Unable to create audit trail file Linux-x86_64 Error: 30: Read-only file system 没有创建adump ...

  6. ORACLE 11G 配置DG 报ORA-10458、ORA-01152、ORA-01110

    操作系统: Oracle Linux Server release 5.7 数据库版本: Oracle Database 11g Enterprise Edition Release 11.2.0.3 ...

  7. oracle11g配置dataguard

     DATAGUARD是通过建立一个PRIMARY和STANDBY组来确立其参照关系.      STANDBY一旦创建,DATAGUARD就会通过将主数据库(PRIMARY)的REDO传递给STAND ...

  8. Oracle11g配置监听

    步骤 1.在windows系统上安装好Oracle后,点击右下角开始菜单Oracle目录下选择Net Manager进行配置,也可以使用Net Configuration Assistant(建议使用 ...

  9. 12c DG broker DMON自动重启过程分析

    一.知识点 1.强烈建议大家管理dataguard使用broker. 2.broker的日志要知道在哪里,会看日志是学习的第一步. 3.体系结构需要看官方文档. 二.测试过程 1.查看DMON进程 & ...

随机推荐

  1. [转]Redis cluster failover

    今天测试了redis cluster  failover 功能,在切换过程中很快,但在failover时有force 与takeover 之分 [RHZYTEST_10:REDIS:6237:M ~] ...

  2. doctest --- 一个改善python代码质量的工具

    [简介] 说实话吧,之前一直没有怎么重视给自己的代码加上测试逻辑:也就是说我只是写了代码,但是并没有给自己的代码加上测试代码: 整个过程就是写完后自己测试一下,看一下跑出来的结果是正确的就心满意足了. ...

  3. 利用百度API(js),怎样通过地址获取经纬度

    根据经纬度找到具体地址:http://api.map.baidu.com/geocoder?location=纬度,经度&output=输出格式类型&key=用户密钥如:http:// ...

  4. C# Task中的Func, Action, Async与Await的使用

    在说Asnc和Await之前,先说明一下Func和Action委托, Task任务的基础的用法 1. Func Func是一种委托,这是在3.5里面新增的,2.0里面我们使用委托是用Delegate, ...

  5. java.util.function 中的 Function、Predicate、Consumer

    函数式接口: 函数式接口(Functional Interface)就是一个有且仅有一个抽象方法,但可以有多个非抽象方法的接口. 函数式接口可以被隐式转换为 Lambda 表达式. Function ...

  6. permutohedral lattice理解

    [完结]saliency filters精读之permutohedral lattice 2012年09月28日 22:40:08 工长山 阅读数:12432    版权声明:本文为博主原创文章,未经 ...

  7. vscode切换界面布局

    调整vscode的控制面板位置 鼠标操作 view>Appearance>Toggle Panel Position   调整控制面板在界面底部 或者界面右侧 2.编辑区分布 鼠标操作 v ...

  8. 【IEEE会议论文】格式规范问题

    - Text area: The height of the text should not be much smaller than 23.5 cm  and the width should no ...

  9. 省市区联动,非ajax请求。

    需求 不允许用 ajax 请求的方式加载数据,所以把所有的省市区写在数组里,用js动态加载. 数据源 民政部门户网站:http://www.mca.gov.cn/article/sj/xzqh/201 ...

  10. python __get__ & __set__

    目的:  提供类似java中的getter/setter的东西. (getter/setter的目的: 将属性方法化,使得属性的引用变得简单---尤其将来属性的读取/赋值有比较复杂的逻辑) 官方简明文 ...