Changing the Data Guard Protection Mode Using the Data Guard Command Line Interface

Using the Data Guard Command Line Interface to change the Data Guard Protection mode is a simple and efficient process. This document will detail the steps using DGMGL to change to all three Data Guard Protection modes.

For more information on the Data Guard Protection modes see the post Changing the Data Guard Protection Mode.

Changing from Maximum Performance to Maximum Availability

Using DGMGRL connect to either the primary or the standby database.

[oracle@prod ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.1.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys
Password:
Connected.
DGMGRL>

Once connected through DGMGRL use the SHOW CONFIGURATION command to see the Data Guard configuration along with the current protection mode.

DGMGRL> show configuration

Configuration - proddb

  Protection Mode: MaxPerformance
  Databases:
    proddb  - Primary database
    standby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL>

In order to change from Maximum Performance to Maximum Availability the Log Transport Mode (LogXptMode) must be set to Synchronous (SYNC). Standby redo logs are also required. The EDIT DATABASE SET PROPERTY command is used to change the LogXptMode.

DGMGRL> edit database standby set property logxptmode=SYNC;
Property "logxptmode" updated
DGMGRL>

Next we change the protection mode to Maximum Availability. The protection mode is changed using the EDIT CONFIGURATION SET PROTECTION MODE AS command.

DGMGRL> edit configuration set protection mode as maxavailability;
Succeeded.
DGMGRL>

You can verify that the protection mode has changed using the SHOW CONFIGURATION command.

DGMGRL> show configuration;

Configuration - proddb

  Protection Mode: MaxAvailability
  Databases:
    proddb  - Primary database
    standby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> 

Change from Maximum Performance to Maximum Protection

To change from Maximum Performance to Maximum Protection the LogXptMode parameter must be set to SYNC. Use the EDIT DATABASE SET PROPERTY command to change the LogXptMode.

DGMGRL> edit database standby set property logxptmode=SYNC;
Property "logxptmode" updated

Next we set the protection mode to Maximum Protection. Note: changing to Maximum Protection mode requires the restart of the primary database. Ensure you are logged into DGMGRL with a user that has SYSDBA privileges.

DGMGRL> edit configuration set protection mode as maxprotection;
Operation requires shutdown of instance "proddb" on database "proddb"
Shutting down instance "proddb"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "proddb" on database "proddb"
Starting instance "proddb"...
ORACLE instance started.
Database mounted.
Database opened.
DGMGRL>

You can verify that the protection mode has changed using the SHOW CONFIGURATION command.

DGMGRL> show configuration;

Configuration - proddb

  Protection Mode: MaxProtection
  Databases:
    proddb  - Primary database
    standby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> 

Change from Maximum Protection to Maximum Performance

The LogXptMode setting for Maximum Performance mode is Asynchronous (ASYNC). Use the EDIT DATABASE SET PROPERTY command to change the LogXptMode to ASYNC.

DGMGRL> edit database standby set property logxptmode=ASYNC;
Error: ORA-16805: change of LogXptMode property violates overall protection mode

Failed.
DGMGRL> 

In the previous examples we were upgrading the protection mode. When upgrading the protection the LogXptMode parameter should be set to the appropriate transport mode prior to changing the protection. In the case of downgrading the protection mode you change the protection mode first then change transport mode.

DGMGRL> edit configuration set protection mode as maxperformance;
Succeeded.
DGMGRL> 

When downgrading from Maximum Performance there is no need to bounce the database.

The last thing to do is to the set the LogXptMode to ASYNC.

DGMGRL> edit database standby set property logxptmode=ASYNC;
Property "logxptmode" updated
DGMGRL>

You can verify that the protection mode has changed using the SHOW CONFIGURATION command.

DGMGRL> show configuration

Configuration - proddb

  Protection Mode: MaxPerformance
  Databases:
    proddb  - Primary database
    standby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL>

The Data Guard Broker Command Line Interface greatly simplifies the transition from one protection mode to another.

6 thoughts on “Changing the Data Guard Protection Mode Using the Data Guard Command Line Interface”

  1. The foll. line seems to have a typo:
    The LogXptMode for Maximum Protection mode is Asynchronous (ASYNC)

    It should be:
    The LogXptMode for Maximum Protection mode is Synchronous (SYNC)

    Thanks.

  2. The foll. line seems to have typo:
    When downgrading from Maximum Performance there is no need to bounce the database.

    Thanks,

  3. i thought that DGMGRL only supported two modes(Maximum Performance and Maximum Availability) instead of three modes

Leave a Reply

Your email address will not be published. Required fields are marked *