There are three types of data guard protection modes in oracle
- Maximum Protection
- Maximum Availability
- Maximum Performance (default)
Before proceeding with next explaining these three modes, you can visit Standby database introduction to understand the purpose of standby database
All of these protection modes provides high data protection, but they differ in terms of availability and performance of primary database
Maximum Protection Mode
- Maximum protection mode guarantees that no data loss will occur if primary database fails by any means
- To provide this level of protection, redo data needs to recover a transaction must be written to both the online redo log and to at least one synchronized standby database before transaction commits.
- To ensure that data loss can not occur, the primary database shutdown rather than continue processing transactions if it can not write to at lease one sync standby database
- Recommendation
- As this protection mode prioritizes data protection over primary database availability, oracle recommends to have minimum two standby database
Maximum availability Mode
- This protection mode provides the highest level of data protection that is possible without affecting availability of the primary database.
- Under normal operations, transactions to not commitment until all redo data needed to recover those transactions has been written to online redo log and based on user configuration one of the following is true
- Redo has been received at standby database and acknowledge sent to primary
- redo has been received and written to standby redo log and acknowledgement sent to primary
- In case primary does not receive acknowledgement from at least one synchronized standby database then it operates as if it were maximum performance mode to preserve primary database availability until it is again able to write it to redo stream o synchronized standby database
- To fully benefit from complete oracle data guard validation at the standby database,be sure to operate in real time apply mode so that redo changes are applied to standby database as fast as they are received.
Maximum Performance Mode
- This protection mode provides highest level of data protection that is possible without affecting the performance of primary database.
- This achieved by allowing transactions to commit as soon as all redo data generated by transactions has been written to the online log
- Redo data is also written to one or mode standby databases but this is due to asynchronously with respect to transactions commitment, so primary database performance is unaffected by time required to transmit redo data and receive acknowledgement from a standby database.
- This protection mode offers slightly less data protection than maximum availability and has minimal impact on primary performance
- This is default protection mode in oracle.
Setting protection mode of primary database
Protection mode can be modified at any time as long as configuration meets requirements of mode.
Below are the steps for the same
Below are the steps for the same
- Decide the protection among the above mentioned three modes
- Verify the protection mode requirements with at lease one configuration standby database. Redo transport required for protection modes are
Availability
|
AFFIRM/NOAFFIRM
|
SYNC
|
DB_UNIQUE_NAME
|
Performance
|
NOAFFIRM
|
ASYNC
|
DB_UNIQUE_NAME
|
Protection
|
AFFIRM
|
SYNC
|
DB_UNIQUE_NAME
|
- Verify if DB_UNIQUE_NAME is set as this is mandatory parameter for data guard configuration
- Verify LOG_ARCHIVE_CONFIG parameter is set, its value includes a DG_CONFIG which includes DB_UNIQUE_NAME of primary and standby database for example
- Set data protection modes using below command
alter database set standby database to maximum {availability|performance|protection};
- Verify on primary using below command
select protection_mode from v$database;