环境:

OS:rhel6.3_64bit

DB:Oracle10gR2

————————————————————————dataguard broker配置————————————————————————
主备库修改参数
SQL>  show parameter broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      /opt/oracle/product/10.2.0/db/
                                                 dbs/dr1stdy.dat
dg_broker_config_file2               string      /opt/oracle/product/10.2.0/db/
                                                 dbs/dr2stdy.dat
dg_broker_start                      boolean     FALSE
SQL> alter system set dg_broker_start=true scope=both;

System altered.
SQL> alter system set dg_broker_start=false scope=both;

System altered.
如果使用监听端口是非默认的需要设置local_listener;
sys@ORA> alter system set local_listener='ora';

System altered.

SQL> ho ps -ef | grep dmon
oracle    9950     1  0 16:54 ?        00:00:00 ora_dmon_stdy
oracle   10075  3077  0 16:54 pts/6    00:00:00 /bin/bash -c ps -ef | grep dmon

SQL> show parameter broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      /opt/oracle/product/10.2.0/db/
                                                 dbs/dr1stdy.dat
dg_broker_config_file2               string      /opt/oracle/product/10.2.0/db/
                                                 dbs/dr2stdy.dat
dg_broker_start                      boolean     TRUE
alter system set dg_broker_config_file1='/opt/oracle/product/10.2.0/db/dbs/dr1dg1.dat' scope=spfile;
alter system set dg_broker_config_file2='/opt/oracle/product/10.2.0/db/dbs/dr2dg1.dat' scope=spfile;
[oracle@eagle ~]$ dgmgrl
DGMGRL for Linux: Version 10.2.0.5.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> help

The following commands are available:

add            Add a standby database to the broker configuration
connect        Connect to an Oracle instance
create         Create a broker configuration
disable        Disable a configuration, a database, or Fast-Start Failover
edit           Edit a configuration, database, or instance
enable         Enable a configuration, a database, or Fast-Start Failover
exit           Exit the program
failover       Change a standby database to be the primary database
help           Display description and syntax for a command
quit           Exit the program
reinstate      Change a disabled database into a viable standby database
rem            Comment to be ignored by DGMGRL
remove         Remove a configuration, database, or instance
show           Display information about a configuration, database, or instance
shutdown       Shutdown a currently running Oracle instance
start          Start Fast-Start Failover observer
startup        Start an Oracle database instance
stop           Stop Fast-Start Failover observer
switchover     Switch roles between the primary database and a standby database

Use "help <command>" to see syntax for individual commands

DGMGRL> connect sys/orcl
Connected.
DGMGRL> CREATE CONFIGURATION 'dg_config' as PRIMARY DATABASE IS 'ora' connect identifier is 'ora';

Configuration "dg1_config" created with primary database "ora"

回退方式

DGMGRL> remove configuration

DGMGRL> DGMGRL>
DGMGRL>
DGMGRL> ADD DATABASE 'stdy' AS CONNECT IDENTIFIER IS 'stdy' MAINTAINED AS PHYSICAL;
Database "stdy" added
DGMGRL>
DGMGRL> ENABLE CONFIGURATION;
show CONFIGURATION;
Enabled.
DGMGRL> show configuration verbose

Configuration
  Name:                dg1_config
  Enabled:             YES
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    ora - Primary database
    stdy - Physical standby database

Current status for "dg1_config":
SUCCESS

DGMGRL> show database ora

Database
  Name:            ora
  Role:            PRIMARY
  Enabled:         YES
  Intended State:  ONLINE
  Instance(s):
    ora

Current status for "ora":
SUCCESS

DGMGRL> show database stdy

Database
  Name:            stdy
  Role:            PHYSICAL STANDBY
  Enabled:         YES
  Intended State:  ONLINE
  Instance(s):
    stdy

Current status for "stdy":
SUCCESS
DGMGRL>  switchover to 'stdy';
Performing switchover NOW, please wait...
Operation requires shutdown of instance "ora" on database "ora"
Shutting down instance "ora"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires shutdown of instance "stdy" on database "stdy"
Shutting down instance "stdy"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "ora" on database "ora"
Starting instance "ora"...
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Failed.
You are no longer connected to ORACLE
Please connect again.
Unable to start instance "ora"
You must start instance "ora" manually
Operation requires startup of instance "stdy" on database "stdy"
You must start instance "stdy" manually
Switchover succeeded, new primary is "stdy"

启动现有环境:
首先启动standby数据库
[oracle@eagle ~]$ sql

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 14 16:56:23 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

idle> startup mount
ORACLE instance started.

Total System Global Area  213909504 bytes
Fixed Size                  2095152 bytes
Variable Size             130025424 bytes
Database Buffers           75497472 bytes
Redo Buffers                6291456 bytes
Database mounted.
idle>  SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS  FROM V$MANAGED_STANDBY;

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CONNECTED             0          0          0          0
ARCH      CONNECTED             0          0          0          0
ARCH      CONNECTED             0          0          0          0

启动主库
[oracle@eagle ~]$ sql

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 14 16:56:30 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to an idle instance.

idle> startup
ORACLE instance started.

Total System Global Area  213909504 bytes
Fixed Size                  2095152 bytes
Variable Size             100665296 bytes
Database Buffers          104857600 bytes
Redo Buffers                6291456 bytes
Database mounted.
Database opened.
idle>  SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS  FROM V$MANAGED_STANDBY;

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CLOSING               1         19          1          1
ARCH      CLOSING               1         19          1          1
ARCH      CONNECTED             0          0          0          0
LNS       WRITING               1         21         22          1
检查standby的进程
idle> /

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#     BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH      CLOSING               1         19          1          1
ARCH      CLOSING               1         20          1        129
ARCH      CONNECTED             0          0          0          0
RFS       IDLE                  1         21         21          1
RFS       IDLE                  0          0          0          0
MRP0      APPLYING_LOG          1         21         19     102400
RFS       IDLE                  0          0          0          0

检查broker的配置
[oracle@eagle ~]$ dgmgrl
DGMGRL for Linux: Version 10.2.0.5.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle
Connected.
DGMGRL> show configuration verbose

Configuration
  Name:                dg_config
  Enabled:             YES
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    ora  - Physical standby database
    stdy - Primary database

Current status for "dg_config":
Warning: ORA-16610: command 'Broker automatic health check' in progress

DGMGRL>  show configuration verbose

Configuration
  Name:                dg_config
  Enabled:             YES
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    ora  - Physical standby database
    stdy - Primary database

Current status for "dg_config":
SUCCESS

dataguard broker配置级别和配置自动auto  failover ,未完待续。。。。。

Oracle 10g dataguard broker 配置的更多相关文章

  1. 在虚拟机上安装红帽Linux.5.5.for.x86.服务器版系统(按针对安装oracle 10g作的配置)

    在虚拟机上安装红帽Linux.5.5.for.x86.服务器版系统(按针对安装oracle 10g作的配置)   软件版本: 虚拟机版本:vmwareworkstation 7.11 build-28 ...

  2. Oracle 10g DataGuard手记之基础配置

    DataGuard为企业数据的高可用性,数据安全以及灾难恢复提供支持,一般由一个primary db与几个物理或逻辑standby db组成一个DataGuard配置. 系统环境 操作系统为windo ...

  3. Oracle物理DG自动切换——Dataguard Broker配置

    1.前言部分 1.1 导读 各位技术爱好者,看完本文后,你可以掌握如下的技能: ① Data Guard Broker 的配置 ② Fast-Start Failover 的配置 ③ Oracle D ...

  4. Linux下Oracle 10g DataGuard配置(主从同步及切换)

    环境描述:主库: IP: 10.8.3.191 主机名:primaryORACLE_SID=afcORACLE_BASE=/u01/oracleORACLE_HOME=/u01/oracle/10g备 ...

  5. Oracle 10g RAC 如何配置 VIP IPMP

    metalink note 283107.1介绍了如何设置VIP的IPMP,此处记录一下设置过程. o Existing 10g RAC installation ^^^^^^^^^^^^^^^^^^ ...

  6. 通过SQL Server 2008 访问Oracle 10g

    原文地址:http://www.cnblogs.com/gnielee/archive/2010/09/07/access-oracle-from-sqlserver.html 之前写过一篇关于SQL ...

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

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

  8. Oracle 10g RAC的负载均衡配置[转载]

    Oracle 10g RAC的负载均衡配置 负载均衡是指连接的负载均衡.RAC的负载均衡主要是指新会话连接到RAC数据库时,如何判定这个新的连接要连到哪个节点进行工作.在RAC中,负载均衡分为两种,一 ...

  9. [转]oracle性能调优之--Oracle 10g AWR 配置

    一.ASH和AWR的故事 1.1 关于ASH 我们都知道,用户在ORACLE数据库中执行操作时,必然要创建相应的连接和会话,其中,所有当前的会话信息都保存在动态性能视图V$SESSION中,通过该视图 ...

随机推荐

  1. Java: Class Variable/Static Variable

    1. Class Variable/Static Variable: Class variable is also known as static variable with "static ...

  2. HTML5列表、块和布局

    一.列表 <ul> <ol> <li> unorder order list ol: type="1 A a I i" start=" ...

  3. opencv hog+svm行人检测

    http://blog.csdn.net/masibuaa/article/details/16105073 http://blog.csdn.net/u011263315/article/detai ...

  4. ionic环境搭建和安装

    1. 安装node环境 nodeJs环境的安装很简单,去官网下载最新版的NodeJs直接安装即可. Node官网: https://nodejs.org/ 安装完成后配置环境变量,计算机->属性 ...

  5. MySQL · 性能优化 · 条件下推到物化表

    MySQL · 性能优化 · 条件下推到物化表 http://mysql.taobao.org/monthly/2016/07/08/ 背景 MySQL引入了Materialization(物化)这一 ...

  6. Jboss 安全和优化

    一.        Jboss后台启动:添加后台修改命令:vi run.shwhile true; do   if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" ...

  7. weblogic对jms实现的QueueConnection实现与TopicConnection实现问题

    今天看了一段之前同事写jms的代码,觉得好像不对,但是不可能,生产上用的代码.刚开始想了下,脑子没转过弯来,后来一想是个简单的问题 代码如下: topicConnection = (TopicConn ...

  8. Oracle Flashback Technologies - 估算不同时间段闪回日志的产生量

    Oracle Flashback Technologies - 估算不同时间段闪回日志的产生量 v$flashback_database_stat监控闪回数据的i/o开销的统计信息,根据之前的系统负载 ...

  9. 使用 CSS 的 :before 和 :after 选择器做一个箭头样式

    对于 :before 和 :after 选择器,大家并不陌生,但是很少有人会主动去用它们.先解释下它们的定义和用法: :before 选择器在被选元素的内容前面插入内容,:after 选择器在被选元素 ...

  10. Iterator和ListIterator主要区别(转)

    Iterator和ListIterator主要区别有: 一.ListIterator有add()方法,可以向List中添加对象,而Iterator不能. 二.ListIterator和Iterator ...