DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Tuesday, September 29, 2015

STEP-BY-STEP CONFIGURATION OF DATA GUARD BROKER IN ORACLE 11G

HERE ARE THE STEPS :

PRIMARY DATABASE   =  CHENNAI
STANDBY DATABASE =  HYDERABAD

Step 1 : Check the Data Guard Broker process on Primary database

SQL> sho parameter dg_broker

NAME                                   TYPE             VALUE
-----------------                       ----------            ----------

dg_broker_start                     boolean          FALSE

Step 2  : Start the Data Guard Broker Process on Primary database   

SQL>alter system set dg_broker_start=true scope=both;


System altered.

Step 3 : Check DG_BROKER on standby database and start it 

SQL> sho parameter dg_broker

NAME                                   TYPE             VALUE
-----------------                       ----------            ----------

dg_broker_start                     boolean          FALSE

SQL>alter system set dg_broker_start=true scope=both;


System altered.

Step 4 :   Edit the listener.ora file

Edit the listener.ora file which includes the db_unique_name_DGMGRL.db_domain values for the GLOBAL_DBNAME
in both primary and standby database . To set the value, lets check the db_domain value .

SQL> show parameter db_domain

NAME                              TYPE               VALUE
--------------                  -----------         --------------
db_domain                         string

Since the value of db_domain  is null so the the value of  GLOBAL_DBNAME = Chennai_DGMGRL for primary
database and for standby  GLOBAL_DBNAME = Hyderabad_DGMGRL The primary listener.ora file  is as

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = Chennai_DGMGRL)
      (ORACLE_HOME = u01/app/san/product/11.2.0/dbhome_1)
      (SID_NAME = Chennai)
    )
  )

Similarly, edit the listener.ora  file on standby database.

Step 5 : Configure the Data Guard Configuration 

SQL> dgmgrl

DGMGRL> connect sys/xxxx@Chennai

Connected.

DGMGRL> create configuration 'dgChennai' as primary database is 'Chennai' connect identifier is Chennai;

> DGMGRL returns the following information:

> Configuration "dgChennai" created with primary database "Chennai" .

> Once the configuration is created then check the status of configuration .

DGMGRL> show configuration
Configuration          - dgChennai
Protection Mode        : MaxPerformance
Databases              : Chennai - Primary database
Fast-Start Failover    : DISABLED

Configuration Status   : DISABLED

Step  6 :  Add standby database to the data broker configuration 

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

>DGMGRL returns the following information:

>Database "Hyderabad" added

DGMGRL> show configuration
Configuration           -  dgChennai
Protection Mode       :  MaxPerformance
Databases                  :  Chennai - Primary database
                                  : Hyderabad - Physical standby database
Fast-Start Failover    :  DISABLED

Configuration Status :  DISABLED

Step 7 : Enable the configuration

DGMGRL> enable configuration
Enabled.
DGMGRL> show configuration
Configuration            - dgChennai
Protection Mode        : MaxPerformance
Databases                   : Chennai - Primary database
                                    : Hyderabad - Physical standby database
Fast-Start Failover      : DISABLED
Configuration Status   : SUCCESS

Step 8 : View the Primary and Standby database properties 

DGMGRL> show database verbose 'Chennai'

Database                         - Chennai
Role                                : PRIMARY
Intended State                 : TRANSPORT-ON
Instance(s)                      :  Chennai
Properties:
DGConnectIdentifier           = 'Chennai'
ObserverConnectIdentifier  = ''
LogXptMode                       = 'ASYNC'
DelayMins                            = '0'
Binding                                 = 'optional'
MaxFailure                            = '0'
MaxConnections                   = '1'
ReopenSecs                            = '300'
NetTimeout                             = '30'
RedoCompression                   = 'DISABLE'
LogShipping                            = 'ON'
PreferredApplyInstance           = ''
ApplyInstanceTimeout             = '0'
ApplyParallel                           = 'AUTO'
StandbyFileManagement         = 'AUTO'
ArchiveLagTarget                   = '0'
LogArchiveMaxProcesses      = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert              = ''
LogFileNameConvert            = ''
FastStartFailoverTarget         = ''
StatusReport                          = '(monitor)'
InconsistentProperties           = '(monitor)'
InconsistentLogXptProps      = '(monitor)'
SendQEntries                        = '(monitor)'
LogXptStatus                        = '(monitor)'
RecvQEntries                        = '(monitor)'
HostName                              = 'TECH-199'
SidName                                = 'Chennai'
StaticConnectIdentifier          = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=TECH-199)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=Chennai_DGMGRL)(INSTANCE_NAME=Chennai)(SERVER=DEDICATED)))'
StandbyArchiveLocation           = '/v10/archive/'
AlternateLocation                = ''
LogArchiveTrace                 = '0'
LogArchiveFormat               = 'ARC%S_%R.%T'
TopWaitEvents                    = '(monitor)'

Database Status                    = SUCCESS

DGMGRL> show database verbose 'Hyderabad'

Database                         - Hyderabad
Role:                               - PHYSICAL STANDBY
Intended State                 :  APPLY-ON
  Transport Lag               :   0 seconds
  Apply Lag                     :   0 seconds
  Real Time Query           :   ON
  Instance(s)                     :   Hyderabad
  Properties:
    DGConnectIdentifier          = 'Hyderabad'
    ObserverConnectIdentifier  = ''
    LogXptMode                       = 'SYNC'
    DelayMins                           = '0'
    Binding                                = 'OPTIONAL'
    MaxFailure                          = '0'
    MaxConnections                  = '1'
    ReopenSecs                          = '300'
    NetTimeout                          = '30'
    RedoCompression                = 'DISABLE'
    LogShipping                        = 'ON'
    PreferredApplyInstance       = ''
    ApplyInstanceTimeout        = '0'
    ApplyParallel                       = 'AUTO'
    StandbyFileManagement     = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses    = '4'
    LogArchiveMinSucceedDest = '1'
    DbFileNameConvert            = 'u10/app/san/oradata/,u10/app/stand/oradata/'
    LogFileNameConvert           = 'u11/app/san/oradata/, u11/app/stand/oradata/'
    FastStartFailoverTarget        = ''
    StatusReport                         = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps      = '(monitor)'
    SendQEntries                        = '(monitor)'
    LogXptStatus                        = '(monitor)'
    RecvQEntries                       = '(monitor)'
    HostName                            = 'TECH-284'
    SidName                              = 'Hyderabad'
    StaticConnectIdentifier      = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=TECH-284)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=Hyderabad_DGMGRL)(INSTANCE_NAME=Hyderabad)(SERVER=DEDICATED)))'
    StandbyArchiveLocation     = 'v10/archive/'
    AlternateLocation                = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat              = 'ARC%S_%R.%T'
    TopWaitEvents                   = '(monitor)'

Database Status                        :   SUCCESS








No comments: