• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

What are Oracle Data Guard Protection Modes (redo transport rules) and how to configure them

By admin

A Data Guard configuration always runs in one of three data protection modes (also called as redo transport rules):

  • Maximum Protection
  • Maximum Availability
  • Maximum Performance (default mode of operation)

All three modes provide a high degree of data protection, but they differ in terms of the effect that each has on the availability and performance of the primary database.

Data Guard Protection modes

The supported redo transport configurations for the 3 Data Guard Protection Modes are as follows.

1. Maximum Protection

This protection mode guarantees that no data loss will occur if the primary database fails. To provide this level of protection, the redo data needed to recover each transaction must be written to both the local online redo log and to a standby redo log on at least one standby database before the transaction commits. To ensure that data loss cannot occur, the primary database will shut down if a fault prevents it from writing its redo stream to at least one synchronized standby database.

Because this data protection mode prioritizes data protection over primary database availability, Oracle recommends that a minimum of two standby databases be used to protect a primary database that runs in maximum protection mode to prevent a single standby database failure from causing the primary database to shut down.

2. Maximum Availability

This protection mode provides the highest level of data protection that is possible without affecting the availability of the primary database. Like maximum protection mode, transactions do not commit until all redo data needed to recover those transactions has been written to the online redo log and to at least one synchronized standby database. Unlike maximum protection mode, the primary database will not shut down if a fault prevents it from writing its redo stream to a synchronized standby database. Instead, the primary database will operate in RESYNCHRONIZATION until the fault is corrected and all log gaps have been resolved. When all log gaps have been resolved, the primary database automatically resumes operating in maximum availability mode.

This mode ensures that no data loss will occur if the primary database fails, but only if a second fault does not prevent a complete set of redo data from being sent from the primary database to at least one standby database.

3. Maximum Performance

This protection mode provides the highest level of data protection that is possible without affecting the performance of the primary database. This is accomplished by allowing a transaction to commit as soon as the redo data needed to recover that transaction is written to the local redo log. The primary database’s redo data stream is also written to at least one standby database, but that redo stream is written asynchronously with respect to the commitment of the transactions that create the redo data.

When network links with sufficient bandwidth and latency are used, this mode provides a level of data protection that approaches that of maximum availability mode with minimal impact on primary database performance.

Prerequisites for the protection modes

To participate in the 3 performance modes the following requirements must be met:

Requirement Maximum protection Maximum Availability Maximum Performance
Redo Archival Process LGWR LGWR LGWR or ARCH
Network Transmission mode SYNC SYNC ASYNC when using LGWR only
Disk Write Option AFFIRM AFFIRM NOAFFIRM
Standby Redo Logs Yes Yes No, but recommended and required for Real-Time Apply
Standby Database Type Physical (9i), Physical & Logical (10g & above) Physical and Logical Physical and Logical

How to change the protection mode (comparison of protection modes)

1. Make sure the LOG_ARCHIVE_DEST_N settings on the primary are configured and the destination enabled to support the target protection mode as documented above. All parameters should be set as needed in the spfile or pfile. For the mode of MAXIMUM PROTECTION, the standby must be up and mounted. For purposes of example, LOG_ARCHIVE_DEST_2 will be used.

SQL> alter system set log_archive_dest_2='service=STBY LGWR SYNC AFFIRM .......... '; 
SQL> alter system set log_archive_dest_state_2=enable;
If using Oracle10g or higher, attributes VALID_FOR and DB_UNIQUE_NAME should also be set as part of the LOG_ARCHIVE_DEST_n.

2. Skip this step if you are on Oracle 11.x or you want to downgrade the Protection Mode in Oracle 10.x Shut down the primary database and restart it in mounted mode. If the primary database is RAC enabled, shut down all of the instances and then start and mount a single instance.

For example:

SQL> shutdown immediate
SQL> startup mount

3. Change the protection mode. If step #2 was done, also open the database and restart the other RAC instances.

SQL> alter database set standby database to maximize {AVAILABILITY | PERFORMANCE | PROTECTION}; 
SQL> alter database open;

4. To confirm the change in protection mode, query v$database on the primary.

SQL> select protection_mode, protection_level from v$database;

Here,
PROTECTION_MODE : Protection mode set for the database
PROTECTION_LEVEL : Actual, real time mode in affect for the database; this will change after outages/faults

Filed Under: Data Guard, oracle

Some more articles you might also be interested in …

  1. RMAN Pluggable Database Backup and Recovery in a Multitenant Environment
  2. How to Trace Dynamic Registration from PMON or LREG (Oracle 12c)
  3. How to Install and configure OSWatcher Black Box (OSWbb)
  4. How To Setup UDEV Rules For RAC OCR And Voting Devices on Partitions
  5. Oracle Database – Measuring Network Capacity using oratcptest
  6. Understanding Oracle Background Processes
  7. 12c ASM: PRCR-1001 : Resource ora.proxy_advm Does Not Exist (Flex ASM with Cardinality = ALL)
  8. Roles and Privileges Administration and Restrictions in Oracle Database
  9. Difference between using srvctl vs using sqlplus for start/stop one or more Oracle Database Instances
  10. Oracle sql script to report the list of files stored in ASM and CURRENTLY NOT OPENED

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary