Dataguard Broker Concepts and Administration- Part 3

Before going through this post do visit Dataguard Broker Concepts and Administration- Part 1 and Dataguard Broker Concepts and Administration- Part 2

In this part we will try to Reinstate a failed primary database.Below mentioned are the steps to do it:

 

1) Restart the Old Primary Database.

Connect to primary database and used the following command to start the primary database.

sqlplus sys@ecpix1 as sysdba

Enter password:

SQL> startup mount

ORACLE instance started.

Total System Global Area  471867392 bytes

Fixed Size                  2130480 bytes

Variable Size             255856080 bytes

Database Buffers          209715200 bytes

Redo Buffers                4165632 bytes

Database mounted.

 

2) Reinstate the old primary database.

Connect to any database system in the broker configuration. For example

dgmgrl connect sys@ecpixsch1

Password: password

Connected.

Once we are connected we will be executing below mentioned command to reinstate primary database

DGMGRL> REINSTATE DATABASE 'ecpix';

Reinstating database "ecpix", please wait...

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

Shutting down instance "ecpix"...

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

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

Starting instance "ecpix"...

ORACLE instance started.

Database mounted.

Continuing to reinstate database "ecpix" ...

Reinstatement of database "ecpix" succeeded

 

3) Show the Configuration and Databases.

Once reinstate was executed successfully we will crosscheck configuration to confirm there is no issues

  • Checking Configuration of Dataguard Broker.
 DGMGRL> SHOW CONFIGURATION

Configuration

  Name:                DGConfig1

  Enabled:             YES

  Protection Mode:     MaxPerformance

  Databases:

    ecpixsch - Primary database

    ecpix    - Physical standby database

Fast-Start Failover: DISABLED

Current status for "DGConfig1":

SUCCESS


  • Checking Configuration of Primary and Standby Database.

Primary Database:

DGMGRL> show database ecpixsch

Database

  Name:          ecpixsch

  Role:            PRIMARY

  Enabled:         YES

  Intended State: TRANSPORT-ON

  Instance(s):

    ecpixsch

Current status for "ecpixsch":

SUCCESS

Standby Database:

DGMGRL> show database ecpix

Database

  Name:          ecpix

  Role:            PHYSICAL STANDBY

  Enabled:         YES

  Intended State: APPLY-ON

  Instance(s):

    ecpix

Current status for "ecpix":

SUCCESS

Dataguard Broker Concepts and Administration- Part 1

Data Guard configuration consists of one primary database and up to thirty standby databases. The databases in a Data Guard configuration are connected by Oracle Net and may be dispersed geographically. There are no restrictions on where the databases are located as long as they can communicate with each other. For example, you can have a standby database on the same system as the primary database, along with two standby databases on another system.

The Data Guard broker logically groups these primary and standby databases into a broker configuration that allows the broker to manage and monitor them together as an integrated unit.

Dataguard Broker Prerequisites

The following conditions must be true before you can use the broker:

  • The primary and standby databases must be running on same version of Oracle Database. The database must be licensed for Oracle Enterprise Edition or Personal Edition.
  • Both the database must be using server parameter file (SPFILE).
  • The value of the DG_BROKER_START initialization parameter must be set to TRUE.
  • Standby redo logs must be configured on the primary and standby databases. You must stop log apply services prior to configuring standby redo logs
  • To enable DGMGRL to restart instances during the course of broker operations, a service with a specific name must be statically registered with the local listener of each instance. The value for the GLOBAL_DBNAME attribute must be set to a concatenation of db_unique_namedb_domain. For example, in the LISTENER.ORA file:

 

LISTENER =

(DESCRIPTION =

(ADDRESS_LIST=

(ADDRESS= (PROTOCOL=tcp) (HOST=host_name) (PORT=port_num))))

SID_LIST_LISTENER=

(SID_LIST=

   (SID_DESC=

      (SID_NAME=sid_name)

      (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)

      (ORACLE_HOME=oracle_home)))

 

PARAMETER_NAME VALUE_OF_PRIMARY VALUE_OF_STANDBY
db_name ecpix ecpix
db_unique_name ecpix ecpixsch
fal_client ecpix1 ecpixsch1
fal_server ecpixsch1 ecpix1
Oracle Version 11.2.0.4.0 11.2.0.4.0

 

Creating the Broker Configuration

  1. Invoke DGMGRL and connect to your primary database. Enter your password for SYS.
bash-3.00$ dgmgrl

DGMGRL for Solaris: Version 11.2.0.4.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys

Password:

Connected.

DGMGRL>

 

  1. Create the broker configuration including a profile for the primary database.
DGMGRL> create configuration 'DGConfig1' as primary database is 'ecpix' connect identifier is ecpix1;

Configuration "DGConfig1" created with primary database "ecpix"

DGMGRL>

 

  1. Display information about the configuration.
DGMGRL> show configuration

Configuration - DGConfig1

Protection Mode: MaxPerformance

  Databases:

ecpix - Primary database

Fast-Start Failover: DISABLED

Configuration Status:

DISABLED

DGMGRL>

 

  1. Use the following commands to add your physical standby database to the broker configuration.
DGMGRL> add database 'ecpixsch' as connect identifier is ecpixsch1;

Database "ecpixsch" added

DGMGRL>

 

  1. Use the SHOW CONFIGURATION command to verify that the standby1 database was added to the configuration.
DGMGRL> show configuration

Configuration - DGConfig1

  Protection Mode: MaxPerformance

  Databases:

   ecpix  - Primary database

    ecpixsch - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

DISABLED

DGMGRL>


 

Enabling the Broker Configuration 

With the Data Guard environment set successfully for your primary and standby databases, you can now enable the broker configuration.

  1. Enable the entire configuration. This may take some time to complete.
DGMGRL> enable configuration

Enabled.
  1. Verify that the configuration was successfully enabled.
DGMGRL> show configuration

Configuration - DGConfig1

 Protection Mode: MaxPerformance

  Databases:

    ecpix  - Primary database

    ecpixsch - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

In later part will be sharing Switchover and Failover steps for Oracle Dataguard using DGMGRL console.