Now execute the following steps in order to use Data Guard broker commands for changing the Data Guard protection mode:
$ 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 /
DGMGRL> SHOW CONFIGURATION;
Configuration - PACKT
Protection Mode: MaxPerformance
Databases:
TURKEY_UN - Primary database
INDIA_UN - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability; Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode Failed.
Again, we should remember that we have to set the SYNC attribute of log_archive_dest_n
before converting the protection mode from Maximum Performance to Maximum Availability and Maximum Protection.
DGMGRL> SHOW DATABASE VERBOSE 'TURKEY_UN' LogXptMode; LogXptMode = 'ASYNC' DGMGRL> SHOW DATABASE VERBOSE 'INDIA_UN' LogXptMode; LogXptMode = 'ASYNC'
For primary:
DGMGRL> EDIT DATABASE 'TURKEY_UN' SET PROPERTY LOGXPTMODE='SYNC'; Property "logxptmode" updated DGMGRL> SHOW DATABASE VERBOSE 'TURKEY_UN' LogXptMode; LogXptMode = 'SYNC'
For standby:
DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY LOGXPTMODE='SYNC'; Property "logxptmode" updated DGMGRL> SHOW DATABASE VERBOSE 'INDIA_UN' LogXptMode; LogXptMode = 'SYNC'
SQL> select group#,bytes from v$standby_log; GROUP# BYTES ---------- ---------- 4 52428800 5 52428800 6 52428800 7 52428800
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability; Succeeded.
DGMGRL> SHOW CONFIGURATION; Configuration - PACKT Protection Mode: MaxAvailability Databases: TURKEY_UN - Primary database INDIA_UN - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS
The Protection status is changed to Maximum Availability. Ensure that the configuration status is SUCCESS
.
We've successfully changed the protection mode from Maximum Performance to Maximum Availability using the DGMGRL command line interface.
Now change the Data Guard protection mode from Maximum Availability to Maximum Protection via DGMGRL. You should be able to make this change without restarting the primary database. Then try mode transition from Maximum Performance to Maximum Protection where you'll be prompted with the following warning:
ORA-16570: database needs restart
It's time to see how the protection mode can be changed with some clicks. Enterprise Manager Cloud Control offers great for monitoring and managing Data Guard environments. Changing the protection mode is also quite easy with this interface.