This post covers things every DBA, Cloud DBA or Apps DBA must know about Data Guard in Oracle Cloud Infrastructure (OCI).
- If you are new to Oracle Cloud Infrastructure or just started learning it, I would suggest you check my previous post where I have covered core terminologies & basic concepts related to Oracle Cloud Infrastructure (OCI)
- If you are a DBA or a beginner to Database in Oracle Cloud & wanted to have a high-level overview of Oracle Database options available on Oracle Cloud, then check here
Introduction To Data Guard
Oracle Data Guard enables & ensures high availability, data protection, and disaster recovery for your enterprise database.
Oracle Data Guard provides an extensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters (such as natural calamities) and data corruption.
Active DataGuard vs Normal DataGuard
Oracle Data Guard maintains these standby databases as a cloned version of the production database and regularly applies changes from Primary Database to Standby Database. Then, If the production database becomes unavailable because of a planned or an unplanned outage, Oracle Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage.
You Can Configure Two Type of Data Guard based on our requirement
1) Active Data Guard: Active Data Guard enables read-only access to a physical standby database for queries, sorting, reporting, Web-based access, and so on, while continuously applying changes received from the production database.
2) Normal Data Guard: Normal Data Guard enables you to switch to the Standby Database when your primary database is down due to some outage or natural calamities. In normal Data guard, you can still open the standby database in read-mode but changes not applied while in read-only mode.
Types: Physical | Logical | Snapshot
- Physical: Redo’s are Shipped & Applied on Standby Database
- Logical: Mainly used for Rolling Upgrades & Redo’s are shipped & transformed to SQL & then they are applied.
- Snapshot: It is used to clone or you want to test some patches. Redo’s are shipped to standby but not applied
In the Standby Database, Recovery Type is Manual & Automatic & Recovery Point is Full Recovery & Point in Time
Data Guard in Oracle Cloud
We can configure Data Guard in Oracle Cloud in two different Database offerings from Oracle Cloud which is Compute know as OCI and second is Compute-Classic also known as OCI-C. If you want to know more about OCI and OCI-C check our previous post on OCI vs OCI Classic: IaaS from Oracle.
Oracle Database on Cloud different choices & options you have for On-premise as well as for Oracle Cloud Check here
Data Guard (DG): ExadataCS
The Oracle Data Guard configuration in Exadata Cloud Service specifically includes one primary database and one standby database.
A standby database is a transactionally consistent copy of the primary database. Once created, the Oracle Data Guard automatically maintains each standby database by transmitting redo data from the primary database and then applying the redo to the standby database.
Exadata Cloud Service also includes Oracle Active Data Guard. Oracle Active Data Guard provides read-only access to the physical standby database while it is synchronized with the primary database, enabling minimal latency between reporting and transactional data. Check more here
- If you are new to ExaCS then look at the Architecture here
Data Guard (DG): VMDB & BMDB
- Data Guard is configured using OCI Console/CLI & is currently available within Region.
- To configure DG across the region or with On-premise or more than 1 standby, use manual method DGMGRL
- You can configure only 1 standby using console / CLI
- For ExadataCS, you need two Exadata DB Systems for Data Guard
- DG requires 2 DB Systems one acting as primary & second as standby
- For VM DB: New DB System with a standby database is created and associated with primary
- For BM DB & ExaCS: DB system to be used as standby must be ready before DB association
- As of Oct 2019, Both DB must be in same compartment & of the same shape
- Both DB must be in same VCN but can be in different Subnet & port 1521 should be open across subnet using Security List or NSG, To know more check here
- It is recommended to have Standby DB on different AD from Primary DB
- If working in Region with one AD, then configure in different FD
Fast- Start Failover (FSFO)
Fast-Start Failover is a feature that allows the Oracle Data Guard broker to failover a failed primary database automatically to a predetermined standby database. This feature increases the availability of the database by eliminating the need for DBA involvement as part of the failover process.
The best practice for high availability and durability is to run the primary, standby, and observer in separate availability domains. The observer determines whether or not to failover to a specific target standby database. The server used for observer requires the Oracle Client Administrator software, which includes the oracle SQL NET and Broker
Things Need to be Taken Care of Before Deploying Data Guard on OCI
- Both Primary & Standby DB systems must be in the same compartment, and they must be the same shape, to know more about Compartment click here
- The database versions and editions of primary & standby must be identical. As of Nov 2018 Data Guard does not support Standard Edition in OCI & Active Data Guard requires Enterprise Edition – Extreme Performance.) To know more about Database offerings in OCI click here
- Both Primary & Standby systems must use the same the VCN, and port 1521 must be open, to know more about VCN in OCI check here
- As of Nov 2018, Data Guard configuration on the Oracle Cloud Infrastructure is limited to one standby database per primary database.
Note: The standby databases in Oracle Cloud Infrastructure Database are physical standbys & as of Nov 2019 Data Guard supports in Bare Metal
Now it’s your turn to post your doubts in the comment section and let us know where you are facing challenges in Oracle Cloud Infrastructure
- Using Data Guard in OCI VM/BM: https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/usingdataguard.htm
- Using Data Guard in ExaCS: https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/exausingdataguard.htm
- Creating a Standby Database with Recovery Manager (Data Guard Concepts and Administration): https://docs.oracle.com/database/121/SBYDB/rcmbackp.htm#SBYDB01500
- Creating a Physical Standby Database (Data Guard Concepts and Administration): https://docs.oracle.com/database/121/SBYDB/create_ps.htm#SBYDB00200
How Can I Learn More
Join our FREE Masterclass on “Upgrade From DBA To Oracle Cloud DBA Including Certification & Earn More In 2020″ where we will be covering more about Datagaurd in OCI & Database
Click on the image below to Register for the FREE Masterclass NOW!