Oracle Data Guard Protection Modes

 

When setting up Oracle Data Guard, one important decision is choosing the right protection mode. 
 
This determines how redo is transported to the standby and what happens when the standby or network is unavailable. 
 
Oracle Data Guard provides three protection modes: 
  • Maximum Performance
  • Maximum Availability
  • Maximum Protection 
The main difference between them comes down to three things: performance, availability, and data loss protection.

Maximum Performance 

Maximum Performance is the default Data Guard protection mode and is commonly used where application performance and primary database availability are important. 
 
In a typical Maximum Performance configuration, redo is sent to the standby asynchronously. The primary database does not need to wait for confirmation from the standby before completing a transaction. 
 
  
The advantage is that network latency between the primary and standby has less impact on transaction response time. 
 
The trade-off is that some data loss is possible. If the primary fails before recently generated redo reaches the standby, those transactions may not be available after a failover. 
 
This mode is often suitable when the standby is located far from the primary or when a small amount of potential data loss is acceptable.

Maximum Availability 

Maximum Availability tries to provide zero-data-loss protection without unnecessarily sacrificing primary database availability. 
 
During normal protected operation, synchronous redo transport is used. The primary waits for the required acknowledgement from the standby before acknowledging the commit.

The important part is what happens if the standby becomes unavailable. The primary can continue processing transactions rather than immediately shutting down, although the same zero-data-loss protection may not be available while the standby is disconnected. Once communication is restored and the required conditions are met, the configuration can return to its intended protection level. 
 
For many critical production systems, this provides a useful balance between availability and data protection.

Maximum Protection

Maximum Protection provides the strongest Data Guard protection against data loss.

Like Maximum Availability, it requires synchronous redo transport to an appropriate standby destination before acknowledging commits.

The major difference appears when the required standby protection cannot be maintained.

With Maximum Protection, Oracle will not simply allow the primary to continue indefinitely without the required protection. The primary database can shut down rather than process transactions that would violate the zero-data-loss requirement.

That makes Maximum Protection appropriate only when preventing committed transaction loss is more important than keeping the primary database available. 
 

Which One Should We Choose? 

There is no single protection mode that is best for every database.

Maximum Performance makes sense when application performance and availability are the priority and the business can tolerate some potential data loss during a major failure.

Maximum Availability is useful when the business wants strong zero-data-loss protection during normal operation but still wants the primary to remain available if standby connectivity is temporarily lost.

Maximum Protection is for environments where committed transaction loss is unacceptable and maintaining that guarantee takes priority over primary availability.

The decision should ultimately come from the application's RPO (Recovery Point Objective) and availability requirements.

Quick Comparison 

Checking the Current Protection Mode 

A DBA can quickly check the current configuration using  
 
SELECT
    NAME,
    DATABASE_ROLE,
    PROTECTION_MODE,
    PROTECTION_LEVEL
FROM V$DATABASE;
PROTECTION_MODE` shows the configured mode, while `PROTECTION_LEVEL` shows the protection level currently being provided. 
 
If Data Guard Broker is being used, the configuration can also be checked with

DGMGRL> SHOW CONFIGURATION;
Data Guard protection modes are really about choosing the right balance. 
 
Maximum Performance focuses on keeping the primary fast and available. Maximum Availability tries to combine zero-data-loss protection with continued primary availability. Maximum Protection puts data protection first, even when that can affect availability. 
 
So instead of simply choosing the mode that sounds the most secure, start with the business requirement - How much data can we afford to lose, and how much downtime can we afford? 
 
The answer to those two questions usually points us toward the right Data Guard protection mode. 

Comments