Implementing Active Data Guard

Active Data Guard is another extension of physical standby, which is open in read-only mode, but applying the logs in the background. This keeps the database up-to-date and allows Real-Time Queries During Managed Recovery process.

a) Current physical standby database configuration details

DGMGRL> show configuration
Configuration - dg1
  Protection Mode: MaxPerformance
  Databases:
    DWHDB - Primary database
    STDBY - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

b) Check the status for Real Time query

DGMGRL> show database 'STDBY'
Database - STDBY
  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: OFF
  Instance(s):
    STDBY
Database Status:
SUCCESS

c) Check database state

SQL> select name, database_role, open_mode from v$database;
NAME      DATABASE_ROLE     OPEN_MODE
--------- ----------------  --------------------
DWHDB     PHYSICAL STANDBY  MOUNTED

 

Convert Physical standby to Active Standby

1) Stop managed recovery (if active)

SQL> alter database recover managed standby database cancel;
OR
DGMGRL> edit database 'STDBY' set state='LOG-APPLY-OFF';

2) Open the database (in read-only mode)

SQL> alter database open;
Database altered.
SQL> select name, database_role, flashback_on, open_mode from v$database;
NAME      DATABASE_ROLE    FLASHBACK_ON       OPEN_MODE
--------- ---------------- ------------------ --------------------
DWHDB     PHYSICAL STANDBY YES                READ ONLY

3) Start managed recovery

SQL> alter database recover managed standby database disconnect;
OR
DGMGRL> edit database 'STDBY' set state='ONLINE';

4) Check the status for Real Time query

DGMGRL>  show database   'STDBY'
Database - STDBY
  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: ON
  Instance(s):
    STDBY
Database Status:
SUCCESS

 

Convert Active standby to Physical  Standby

1) Stop managed recovery (if active)

SQL> alter database recover managed standby database cancel;
OR
DGMGRL> edit database 'STDBY' set state='LOG-APPLY-OFF';

2) Shut down the physical standby database

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

3) Restart the physical standby database instance in MOUNT mode

SQL> startup mount
ORACLE instance started.
Total System Global Area 1.0289E+10 bytes
Fixed Size                  2233048 bytes
Variable Size            5268049192 bytes
Database Buffers         4999610368 bytes
Redo Buffers               18722816 bytes
Database mounted.

4) Start managed recovery

SQL> alter database recover managed standby database disconnect;
OR
DGMGRL> edit database 'STDBY' set state='ONLINE';

5) Check the status for Real Time query

DGMGRL> show database 'STDBY'
Database - STDBY
  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: OFF
  Instance(s):
    STDBY
Database Status:
SUCCESS
 
Advertisements
This entry was posted in Active Data Guard, Oracle Data Guard and tagged , . Bookmark the permalink.

2 Responses to Implementing Active Data Guard

  1. Sanjay says:

    Why we are not doing the Convert to Active using dgmgmrl and using SQL Plus.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s