Friday, December 30, 2011

Configuring Dataguard Broker

Broker log files are created in the alert log directory and are named drc.log.

1.SET  FOLLOWING PARAMETER TO TRUE

ALTER SYSTEM SET DG_BROKER_START=TRUE;

2.  DGMGRL

DGMGRL> CONNCT SYS@PRIMARY/ORACLE

3. Create the broker configuration.

CREATE CONFIGURATION DATAGUARD AS

  PRIMARY DATABASE IS PRIMARY

  CONNECT IDENTIFIER IS PRIMARY;

4. Show the configuration information.

>SHOW  CONFIGURATION ;

Configuration

  Name:                dataguard

  Enabled:             NO

  Protection Mode:     MaxPerformance

  Fast-Start Failover: DISABLED

  Databases:

    primary - Primary database

Current status for "dataguard":

DISABLED

5. ADD STANDBY DATABASE TO BROKER

>ADD DATABASE STANDBY  AS

  CONNECT IDENTIFIER IS STANDBY

  MAINTAINED AS PHYSICAL;

6. >SHOW CONFIGURATION;

Configuration

  Name:                dataguard

  Enabled:             NO

  Protection Mode:     MaxPerformance

  Fast-Start Failover: DISABLED

  Databases:

    primary - Primary database

    standby - Physical standby database

Current status for "dataguard":

DISABLED

7. ENABLE CONFIGURATION

> ENABLE CONFIGURATION ;

Warning: ORA-16607: one or more databases have failed

Check broker log  file

    Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode

    Maintain  LogXptMode parameter  as SYNC IN BOTH  DBS

    ORA-16628: the broker protection mode is inconsistent with the database setting

    Maintain protection modes are same in broker and db

    ORA-16072: a minimum of one standby database destination is required

Most likely cause for this error is ,primary LOG_ARCHIVE_DEST_2 was not in sync with the Standby protection mode.

eg:-

log_archive_dest_2 = SERVICE=orcl1 LGWR ASYNC NOAFFIRM
log_archive_dest_3 = SERVICE=orcl2 LGWR ASYNC NOAFFIRM

Please set the Primary Init.ora parameter log_archive_dest_ correctly (at least for one standby destination) in sync with the standby Protection mode..

Requirements for Maximum Protection and Maximum Availability modes :
- Redo archival process: LGWR
- transmission mode: SYNC
- Disk write option: AFFIRM

---------------------------------------OR


Change the Protection mode to Maximum performance

Setting Protection Modes in Database

ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {AVAILABILITY | PERFORMANCE | PROTECTION};

Fast-Start Failover (FSFO) feature that provides an ability of automatic failover to the standby database if the primary database is not available for certain time.

PREREQUIREMENTS:

Enabling Fast-Start Failover requires the following pre-requisites to be met:
Flashback Database feature is enabled on both the primary and the standby database.
The protection mode of the configuration must be set to MAXIMUM AVAILABILITY
tnsnames.ora in the ORACLE_HOME where the observer runs must be set to see both databases, the primary and the standby.
DGMGRL must be available on the observer host.

No comments: