Oracle Data Guard Presentation
Oracle Data Guard Presentation
Ljiljana Perica
Principal Solutions Specialist Engineer
ljiljana.perica@oracle.com
Oracle (Active) Data Guard & MAA
2
High Availability and Disaster Recovery
Protect data and systems from outages
3
Impact of database downtime
$350K $10M
average cost of downtime average cost of unplanned data
per hour center outage or disaster
87 hours 91%
average amount of downtime percentage of companies that have
per year experienced an unplanned data
center outage in the last 24 months
Continuous availability
Data protection
Active replication
Production site Replicated site
Scale out
5
MAA reference architectures
Availability service levels
All tiers exist with on-premises and cloud. However, platinum currently must be
configured manually while bronze to gold are covered with cloud tool automation for
the most part depending on the desired RTO (i.e. FSFO & multiple standby databases
still must be manually configured for example)
7
Data Corruptions Happen All the Time
Fundamental shortcoming of Storage Replication: inadequate isolation, zero application-level validation
Any component in the systems stack can fail and cause data
corruptions*
• Software: applications, middleware, database
• Hardware: disk drives / controllers, HBAs, memory
• Network: routers, switches, cables
• Operational: human errors, bad installs & upgrades
Increasing data volumes and complex I/O subsystems:
• Impact of data corruptions is disastrous
• Very hard to debug and diagnose
•Ref. “Hard Disk Drives – the Good, the Bad & the Ugly”, ACM Queue, Sep/Oct 2007,
http://queue.acm.org/detail.cfm?id=1317403
DATAFILES DATAFILES
SYNC or ASYNC
LOGFILES LOGFILES
block replication
CONTROLFILES CONTROLFILES
9
Data Guard is optimized for the database
It efficiently maintains a physical copy of production and guarantees its integrity
• Validation end to end
Primary Site
• Ransomware Protection
Online • Only the essential information (Redo) is replicated
Redo Logs
• Efficient and performant
Standby Site
SGA LGWR
REDO
BUFFER NSS/
SYNC or ASYNC RFS MRP
TT Redo transport
Primary Standby
Redo Logs
Standby
Database Database
10
Active Data Guard Does What Storage Mirroring Can’t
Automatic Block Repair - Transparently repairs corrupted blocks
11
Oracle Data Guard Overview
12
What is Oracle Data Guard?
Primary (production) Standby
database Database(s) (sync. copy of Pdb, max 30 Sdb)
Redo transport
SYNC / ASYNC
Oracle Net
Database Database
copy
Works with a production db and one or more standby dbs to protect your data against failures, errors, and
corruptions that might otherwise destroy your db
Types of Standby Databases
14
Role Transitions: Switchover and Failover
• Switchover
‐ Planned role reversal
‐ Used for OS or hardware maintenance
• Failover
‐ Unplanned role reversal
‐ Emergency use
‐ Zero or minimal data loss (depending on choice of dataprotection mode)
‐ Can be initiated automatically when fast-start failover is enabled
15
Oracle Data Guard: Architecture (Overview)
16
Physical Standby Database: Redo Apply Architecture
How is your physical standby database synchronized with a primary database
17
Logical Standby Database: SQL Apply Architecture
How is your logical standby database synchronized with a primary database
18
Automatic Gap Detection and Resolution
19
Data Guard Data Protection Modes
Different Configurations that Balance Data/Transaction Protection with Performance and Availability
21
Oracle Active Data Guard (ADG)
• Increases performance, availability, data protection, and ROI wherever DG is used for real-time data
protection and availability
• Is an option for Oracle Database Enterprise Edition
• Enhances quality of service by offloading resource intensive activities from a Production db to a Standby db
• Includes the following features:
‐ Physical Standby with Real-time Query
‐ Fast Incremental Backup on Physical Standby
‐ Automatic Block Repair
‐ Active Data Guard Far Sync
‐ Global Data Services
‐ Real-Time Cascade
‐ Application Continuity
‐ Rolling Upgrade using Active Data Guard
‐ Active Data Guard DML Redirection (not available in Authorized Cloud Environments)
• Licensing Guide:
‐ https://docs.oracle.com/en/database/oracle/oracle-database/19/dblic/Licensing-Information.html#GUID-
AB354617-6614-487E-A022-7FC9A5A08472
• Demos:
‐ https://www.oracle.com/database/technologies/high-availability/dataguard-activedataguard-demos.html
22
Dynamic: Activate Active Data Guard per database as demand requires it
With Data Guard Broker
• Connect to the Standby db with SQL*Plus and execute the following command:
• ALTER DATABASE OPEN;
23
ADG: Real-Time Query
24
Real-Time Query
Read-only Standby while Recovery is Active
Activation
26
ADG
Real-Time Query
Not just Selects for your Application Workloads!
27
ADG: DML Redirection
28
NEW IN
31
Fast Incremental Backup on Physical Standby
Enable the Block Change Tracking to speed up backups and avoid unnecessary I/O
Primary Standby
Primary Standby
BCT BCT
34
ADG
The Zero Data Loss Challenge
Trade-off Performance for Protection
ASYNC
PRIMARY STANDBY
FAR ASYNC
SYNC Optional RedoCompression (*)
SYNC STANDBY
PRIMARY
SYNC
• Supports FSFO in MaxAvailavility
• Supports FSFO in MaxPerformance (new in 21c)
Primary Site Standby Nearby Site
* The Far Sync nodes do not require any license, provided that all the other nodes running databases in the configuration are
licensed with Enteprise Edition and Active Data Guard
38
Active Data Guard: up to 30 direct standbys and 253 total members ADG
Far Sync and Cascading Standby open endless possibilities
• Disaster Recovery
• Query & Reporting Offload
BACK • DML Redirection
UP • Snapshot Standby for tests
Snapshot
Standby • Rolling Maintenance
• Rolling Upgrade
Primary DML • Migration to new Hardware
Redirect
• Source for thin clones
BACK
• Backup Offload
UP
• GoldenGate Extract Offload
• Recovery Appliance
FAR
SYNC
Thin Clones
39 Copyright © 2022, Oracle and/or its affiliates
ADG
Real-Time Cascade Standby
Offload multiple redo transports to a first-level standby
BOSTON
RedoRoutes=
(LOCAL : ( NASHUA SYNC PRIORITY=1, NEWYORK ASYNC PRIORITY=8, NEWARK ASYNC PRIORITY=8 ))
(NASHUA : NEWYORK ASYNC, NEWARK ASYNC ))
NASHUA
RedoRoutes=
(LOCAL : ( BOSTON SYNC PRIORITY=1, NEWYORK ASYNC PRIORITY=8, NEWARK ASYNC PRIORITY=8 ))
(BOSTON : NEWYORK ASYNC, NEWARK ASYNC ))
ALTERNATE
NEWYORK
NEWARK • Explicit “ASYNC” in the cascading member means “Real-Time Cascade”. Such configuration
requires Active Data Guard.
• If not specified, the redo is shipped at log switch.
BOSTON
RedoRoutes=
(LOCAL : ( NASHUA SYNC PRIORITY=1, NEWYORK ASYNC PRIORITY=8, NEWARK ASYNC PRIORITY=8 ))
(NASHUA : NEWYORK ASYNC, NEWARK ASYNC ))
NASHUA
RedoRoutes=
(LOCAL : ( BOSTON SYNC PRIORITY=1, NEWYORK ASYNC PRIORITY=8, NEWARK ASYNC PRIORITY=8 ))
(BOSTON : NEWYORK ASYNC, NEWARK ASYNC ))
NEWYORK
ALTERNATE
NEWARK
• RedoRoutes is an efficient way to route the redo properly in any situation.
• The Broker takes care of all the complex LOG_ARCHIVE_DEST_n modifications.
42
Original version
Reduce Planned Downtime
New version
General Process for Database Rolling Maintenance
Database A Database B
Install new version in separate Oracle
homes and defer transport REDO
REDO
DELETE FROM CUSTOMERS WHERE ...
Switchover
SQL
SQL
REDO
UPDATE TRANSACTIONS SET ...
19c
Start in new OPTIONAL
Oracle Home
Physical
Redo Convert to
Standby SQL> alter database recover
Logical Standby to logical standby keep identity;
48
Benefits of Implementing Oracle Active Data Guard
• Continuous service
• Flexible configurations
• Centralized management:
• Excellent ROI
49
Oracle Active Data Guard
Actively protecting data towards the future both on-premises and in the cloud