Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

Oracle Data Guard Protection Modes

 Atikh Shaikh     oracle     No comments   

There are three types of data guard protection modes in oracle
  1. Maximum Protection
  2. Maximum Availability
  3. Maximum Performance (default)
protection modes in oracle database, maximum protection, maximum availability, maximum performance, technodba, database blog, standby database, DR database, oracle data guard
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

  • 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 
       LOG_ARCHIVE_LOG='DG_CONFIG=('PRIM','STDBY')'
  • 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;

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit

Standby database Introduction

 Atikh Shaikh     oracle     No comments   

Standby database is an important aspect in oracle, its useful in disaster recovery scenarios and to carry out testing on production data without hurting production database performance. We will discuss more about standby database.
  • Standby database is database replica created from backup of primary database
  • By applying archived redo logs from primary database to standby database, once can keep two databases in synchronized
  • Purpose of having standby database 
    • Disaster protection
    • Data corruption protection
    • Supplemental reporting or testing
Configuration Options
We can setup a standby database in several different ways depending on method for
  • Transferring archived redo logs
  • Applying archived redo logs
Example: 
Managed standby environment allows primary database to automatically archives redo logs to standby database site so long as standby instance is started
Non-managed standby environment makes it compulsory to transfer archived redo logs manually
Managed standby mode - it automatically applies logs received from primary database
manual recovery mode - apply logs manually

Pros and Cons of standby database
Pros
  • A standby database is powerful configuration for both disaster recovery and supplementary reporting and testing 
  • We can maintain several standby database in geographically diverse locations
  • Maintain primary and standby database on same machine on different drive/file system
  • We can make standby database the new primary database with minimal loss of time and data
  • Standby database provides protection against
    • erroneous batch jobs
    • user errors
    • applying corruption on primary by not applying corrupt data on standby site
Cons
  • It requires additional machine if you want to maximize disaster protection by keeping standby database on separate host
  • Implementation and maintenance of Net8
  • Additional system resource and cost
  • Extra efforts for administration of standby site. 
Types of standby databases
In oracle standby database can be one of these types
  1. Physical standby database
  2. Logical standby database
  3. Snapshot standby database
Physical standby database
  • Physical standby database is an exact block for block copy of primary database
  • This physical standby database uses process called redo apply i.e. redo received from primary database gets applied to standby database using recovery process
  • This can be opened for read only access to execute number of reporting and testing queries
  • With license of active data guard redo can be applied during database is open mode
  • Benefits:
    • Disaster recovery and high availability
    • Data protection
    • Reduction in primary database workload performance
Logical standby database
  • Initially logical standby database is identical copy of primary database but later can be altered to have different structure
  • This type of standby database is updated or brought up in sync by executing SQL statements.
  • Oracle data guard automatically applies data from archived redo logs on standby database by transforming data into SQL statements and then executing SQL statements on logical standby database
  • Database must remain open as it uses SQL statements to update logical standby database
  • Although this database remain in read/write mode its target table will be only available for read only operations
  • Benefits: 
    • Ideal for High Availability
    • Minimizes downtime on software update
    • support for reporting and decision support requirements
Snapshot standby database
  • Snapshot standby database is type of updatable standby database has full data protection for primary database
  • A snapshot standby database receives and archives but does not apply redo data from its primary database
  • Redo data received from primary database is applied when snapshot standby database is converted back into physical standby database.
  • The data of primary database is fully protected as snapshot standby database can be converted to physical standby database any time and redo is then applied
  • Benefits
    • It provides exact replica of production database for development and testing purpose while data protection at all time
    • It can be easily refreshed to contain current production data by converting to physical standby database and re synchronizing
In next article we are going to discuss about different protection modes in oracle for data guard configuration.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Newer Posts Older Posts Home

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ►  2018 (38)
    • ►  November (25)
    • ►  December (13)
  • ▼  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ▼  March (2)
      • Standby database Introduction
      • Oracle Data Guard Protection Modes
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
    While performing impdp operations in the Oracle database, Oracle performs validation checks for every constraint on the imported table, that...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © Atikh's DBA blog | Powered by Blogger