Chapter 17 · Data Guard, Standby Databases, Broker, and High Availability
Active Data Guard Concepts, Read-Only Workloads, Backup Offload, and Licensing Awareness
Separate ordinary Data Guard from Active Data Guard real-time query and advanced offload features, including the special CDB$ROOT read-only licensing rule, RMAN backup interchangeability, fast incremental backups and automatic block repair.
Learning outcomes
ServiceHub spends heavily on a disaster-recovery standby that sits mounted most of the year. Management asks to run reports and backups there. Basic Data Guard already permits important standby backup workflows, but Active Data Guard (ADG) adds separately licensed capabilities—most visibly real-time query, where a physical standby is open read-only while Redo Apply continues. That distinction must be enforced by architecture and license policy, not by whether a command happens to work.
Separate basic physical Data Guard Redo Apply from Active Data Guard real-time query.
Apply the current licensing rule for CDB$ROOT versus PDB read-only access on a standby.
Explain RMAN backup interchangeability/offload separately from ADG fast incremental backup.
Identify ADG features such as automatic block repair, Far Sync, real-time cascade and rolling-upgrade automation.
Design read-only workload routing with data currency and application consistency checks instead of assuming a standby is always current.
The chapter was reviewed against Oracle AI Database 26ai RU 23.26.3, SQL Developer 26.2, and SQLcl 26.2.1. Oracle AI Database Free remains limited to 2 foreground CPU cores, 2 GB combined SGA/PGA memory, 12 GB user data, and one installation per logical environment, and receives no Oracle patches or Support service requests. Crucially, the current 26ai licensing matrix marks Oracle Data Guard Redo Apply, SQL Apply, Snapshot Standby, and Oracle Active Data Guard unavailable in Free. Therefore the mandatory Free exercises are architecture/design-validation labs using the existing FREE/FREEPDB1 database; they do not create a standby or enable Data Guard. Actual Data Guard commands are labeled for Oracle Enterprise Edition / EE-ES or entitled cloud offerings with at least two independent database systems plus Oracle Net connectivity. Active Data Guard features and Far Sync have their own option/offerings boundaries. No AWR/ASH/Diagnostics Pack is required for mandatory monitoring examples.
1. Basic Data Guard protects; Active Data Guard also serves live read workloads during apply
A basic physical standby can be mounted while Redo Apply keeps it current. It can also be opened read-only when apply is stopped. The Active Data Guard real-time query feature allows the physical standby to remain open read-only while Redo Apply is active, so read workloads can use current applied data with a measurable apply lag.
SELECT database_role, open_mode, protection_mode, protection_levelFROM v$database;SELECT name, value, time_computed, datum_timeFROM v$dataguard_statsWHERE name IN ('transport lag','apply lag')ORDER BY name;SELECT name,role,applyFROM v$dataguard_processORDER BY name;
An expected ADG real-time-query state is
DATABASE_ROLE='PHYSICAL STANDBY',
OPEN_MODE='READ ONLY WITH APPLY', with MRP/redo
apply active.
2. Current multitenant licensing has an important root/PDB distinction
The 26ai licensing manual explicitly says the standby
CDB$ROOT may be opened read-only without an Active
Data Guard license. However, opening
any pluggable database (PDB) in the standby for reads
requires Active Data Guard. Since ServiceHub data lives in
FREEPDB1/application PDBs, useful application read
offload is an ADG-licensed activity.
Licensing follows the feature/use, not parser acceptance. Check the exact production offering and option before opening standby PDBs for query workloads.
3. Read offload must include currency semantics
A standby query can be read-consistent at its own applied SCN yet still trail the primary. An application that writes to primary and immediately reads from standby can therefore observe an older business state unless the application/connection layer enforces a currency contract.
SELECT name, value, datum_timeFROM v$dataguard_statsWHERE name IN ('transport lag','apply lag')ORDER BY name;SELECT current_scnFROM v$database;
Do not create a universal “apply lag must be less than 1 second” rule. Each read workload needs an explicit staleness tolerance, and critical read-after-write flows may need to stay on the primary or wait for a defined apply point.
4. RMAN backup offload is broader than real-time query
RMAN understands physical Data Guard environments. With a recovery catalog, backups created on a physical standby can be usable on the primary and vice versa, subject to media accessibility/association. This lets organizations offload backup I/O without requiring application queries on the standby.
rman target /BACKUP DATABASE PLUS ARCHIVELOG TAG 'SERVICEHUB_STANDBY_BACKUP';
The standby state determines whether a backup is consistent/inconsistent and therefore whether recovery is required. Keep the recovery catalog/media/key path synchronized across sites.
5. “Fast Incremental Backup on Physical Standby” is an ADG feature
Do not conflate ordinary standby RMAN backup with the separately licensed Active Data Guard Fast Incremental Backup on Physical Standby capability. The current licensing manual lists that optimization inside the ADG option. The same option also includes automatic block repair, Far Sync, real-time cascade, Global Data Services, Application Continuity and rolling-upgrade automation.
6. Automatic block repair is another ADG value proposition
With Active Data Guard real-time query, Oracle can transparently use a good copy of a corrupted block from the peer database for automatic block repair in supported scenarios. This is not a replacement for storage diagnosis or RMAN validation; it is an online repair capability layered on top of the HA topology.
7. Free licensing-awareness lab: prove the local environment is not a standby
SELECT db_unique_name, database_role, open_mode, protection_mode, protection_levelFROM v$database;SELECT COUNT(*) AS dg_process_rowsFROM v$dataguard_process;SELECT COUNT(*) AS dg_lag_rowsFROM v$dataguard_stats;
On the ordinary Free primary you should see
PRIMARY; lag rows are not expected on a primary.
This lab teaches how to identify role/feature state without
attempting to enable an unlicensed feature.
8. Design a read-service contract before offloading
| Workload | Suitable standby-read contract? | Evidence needed |
|---|---|---|
| Daily reporting | Often yes | Maximum tolerated apply lag, query resource capacity |
| Ad-hoc analytics | Often yes | Concurrency/temp/I/O impact and lag monitoring |
| Immediate read-after-write API | Often primary unless coordinated | Commit/apply-point guarantee |
| Backup jobs | Can often offload with RMAN/Data Guard design | Catalog/media accessibility, recovery validation |
| Writable application transaction | No ordinary read-only standby | Requires primary or specific licensed/cloud redirection capability |
9. Deliberately wrong: route every SELECT to the standby because “it's read-only”
Some requests depend on data just committed on primary; others invoke packages, sequences, temporary objects, session state or features whose behavior must be tested on read-only standby. Blind SQL routing can produce stale business decisions even while every query succeeds. Route by workload contract, not by SQL verb alone.
10. Production judgment
Use basic Data Guard for data protection and role transition where licensed. Add Active Data Guard when read/offload/repair/Far Sync/advanced HA capabilities justify the option cost. License both the primary and every standby using ADG features as required by Oracle's licensing rules; basic standbys that do not use ADG features do not automatically need the ADG option.
The mandatory course path stays Free and does not open a standby PDB. Lesson 5 now addresses the operational risk that remains even after topology/licensing are correct: determining when a failure is real, preventing two primaries, routing clients, and measuring failover/reintegration.
Check your understanding
- What state defines Active Data Guard real-time query?
- Can standby CDB$ROOT be opened read-only without ADG under the current licensing note?
- Can an application PDB be opened for standby reads without ADG?
- Are all RMAN backups on a physical standby necessarily an ADG feature?
- Why can a successful standby SELECT still be wrong for a business request?
Review the answers
A physical standby is open READ ONLY while Redo Apply remains active, typically shown as READ ONLY WITH APPLY.
Yes, the licensing manual explicitly permits read-only CDB$ROOT without ADG.
No. Opening any standby PDB for reads requires the Active Data Guard option under the current licensing rule.
No. RMAN/Data Guard supports ordinary standby backup workflows; the fast incremental backup optimization is specifically an ADG feature.
The standby can be transactionally consistent at an applied SCN but still lag the primary, violating a read-after-write or freshness requirement.
Authoritative references
- Getting Started with Oracle Data Guard — physical standby read-only and real-time-query distinction
- Oracle Active Data Guard Overview — ADG offload/repair capabilities
- Using RMAN in Data Guard Configurations — standby backup interchangeability
- Managing Physical Standbys — read-only/apply and block repair
- Licensing Information — ADG option contents and CDB$ROOT/PDB licensing rule