在配置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. mongodb 复杂查询之 本表 join

      mongdb 的数据介绍: 系统有多个用户,contractId 代表用户Id,其中 serialno 也是一种 id,代表该客户登录系统的编号,该 contractId 每次登录系统都会产生不同 ...

  2. neo1973 audio subsystem

    fhttp://wiki.openmoko.org/wiki/Neo_1973_audio_subsystem using Bluetooth headset with GSM NOTE none o ...

  3. 大话Json对象和Json字符串

    一.Json对象和Json字符串的区别 (1)Json对象:可以通过javascript存取属性. 先介绍一下json对象,首先说到对象的概念,对象的属性是可以用:对象.属性进行调用的.例如: var ...

  4. mui 浏览器一样自动缩放

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...

  5. 【ML入门系列】(一)训练集、测试集和验证集

    训练集.验证集和测试集这三个名词在机器学习领域极其常见,但很多人并不是特别清楚,尤其是后两个经常被人混用. 在有监督(supervise)的机器学习中,数据集常被分成2~3个,即:训练集(train ...

  6. 图解JAVA参数传递

    今天做项目,发现了一个问题,当String作为参数传递的时候,在函数内部改变值对外部的变量值无影响,如下代码: public static void main(String[] args) { Str ...

  7. Java多线程并发编程一览笔录

    线程是什么? 线程是进程中独立运行的子任务. 创建线程的方式 方式一:将类声明为 Thread 的子类.该子类应重写 Thread 类的 run 方法 方式二:声明实现 Runnable 接口的类.该 ...

  8. 基于【CentOS-7+ Ambari 2.7.0 + HDP 3.0】搭建HAWQ数据仓库02 ——使用ambari-server安装HDP

    本文记录使用ambari-server安装HDP的过程,对比于使用cloudera-manager安装CDH,不得不说ambari的易用性差的比较多~_~,需要用户介入的过程较多,或者说可定制性更高. ...

  9. Centos7 启动脚本

    Centos7 启动脚本 启动脚本.如果进程已存在,输出错误信息后退出: #! /bin/bash PIDS=`ps -ef | grep '/usr/bin/node ./index.js' | g ...

  10. Excel数据与DateTable数据的转换

    public class ExcelHelper : IDisposable { private string fileName = null; //文件名 private IWorkbook wor ...