Thursday, April 7, 2011

Oracle 11g R2 - Configuring Data Guard / Part II

Enabling Data Guard Broker

The following article, depends on the previous article which is “Configuring Data Guard Part I”.

After I created the physical standby server, although it’s necessary, I decided to enable Data Guard Broker. The advantage of Data Guard Broker is easier management. You’ll see this on my other article (Part III). 
So here are the steps. 
*** Be careful about the server that you execute the commands on. In every section, there’s a note about on which server that the script is going to be executed***
PRIMARY SERVER
SQL> show parameter dg_broker
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      /u01/app/oracle/product/11.2.0
                                                 /db_1/dbs/dr1primary.dat
dg_broker_config_file2               string      /u01/app/oracle/product/11.2.0
                                                 /db_1/dbs/dr2primary.dat
dg_broker_start                      boolean     FALSE
SQL> alter system set dg_broker_start=true;
System altered.
SQL> show parameter dg_broker_start
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     TRUE
STANDBY  SERVER
SQL> show parameter dg_broker
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      /u01/app/oracle/product/11.2.0
                                                 /db_1/dbs/dr1primary.dat
dg_broker_config_file2               string      /u01/app/oracle/product/11.2.0
                                                 /db_1/dbs/dr2primary.dat
dg_broker_start                      boolean     FALSE
SQL> alter system set dg_broker_start=true;
System altered.
SQL> show parameter dg_broker_start
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     TRUE
LISTENER.ORA    --STANDBY SERVER -- Add this section to listener.ora.
SID_LIST_LISTENER =
  (SID_LIST =
  
  (SID_DESC = 
    (GLOBAL_DBNAME = sby1_DGMGRL.europe)
    (SID_NAME = sby1)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1))
  )
lsnrctl stop
lsnrctl start
LISTENER.ORA    --PRIMARY SERVER -- Add this section to listener.ora.
SID_LIST_LISTENER =
  (SID_LIST =
  
  (SID_DESC = 
    (GLOBAL_DBNAME = primary_DGMGRL.europe)
    (SID_NAME = primary)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1))
  )
lsnrctl stop
lsnrctl start
Still on the primary server
[oracle@rome ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.1.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/Oracle_1
Connected.
DGMGRL> show configuration
ORA-16532: Data Guard broker configuration does not exist
Configuration details cannot be determined by DGMGRL
DGMGRL> create configuration 'DGConfig1' as 
> primary database is 'primary'
> connect identifier is primary;
Configuration "DGConfig1" created with primary database "primary"
DGMGRL> show configuration
Configuration - DGConfig1
  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
DGMGRL> add database 'sby1' as 
> connect identifier is sby1;
Database "sby1" added
DGMGRL> show configuration
Configuration - DGConfig1
  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    sby1    - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration
Configuration - DGConfig1
  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    sby1    - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home