Chapter 15 · RMAN Backup, Restore, Recovery, and Disaster-Recovery Engineering
Block Media Recovery, Validation, Corruption Detection, Crosschecks, and Backup Optimization
Use VALIDATE/BACKUP VALIDATE, V$DATABASE_BLOCK_CORRUPTION, CROSSCHECK, RESTORE VALIDATE, and conditional block media recovery to distinguish physical/logical corruption and prove why a completed backup is not the same as tested recoverability.
Learning outcomes
A nightly RMAN job exits with “Finished backup,” yet a month
later a storage checksum failure exposes unreadable blocks in an
old datafile. Another team runs CROSSCHECK every
morning and calls that a restore test. These operations answer
different questions. Recoverability needs media existence,
readable/structurally valid blocks, usable backup pieces,
required redo, encryption keys, and application-level
restoration checks.
Distinguish physical and logical block corruption and the default RMAN checks for each.
Use VALIDATE CHECK LOGICAL, RESTORE ... VALIDATE, and V$DATABASE_BLOCK_CORRUPTION as different evidence layers.
Explain block media recovery and RECOVER CORRUPTION LIST without deliberately damaging blocks.
Use CROSSCHECK status semantics correctly and keep repository/media reconciliation separate from block validation.
Explain backup optimization as skip/reuse policy rather than proof that skipped content is independently recoverable.
Mandatory work targets Oracle AI Database Free 26ai, reviewed against RU 23.26.3, SQL Developer 26.2, and SQLcl 26.2.1. Free is limited to 2 foreground CPU cores, 2 GB combined SGA/PGA memory, 12 GB user data, and one installation per logical environment; Oracle supplies neither patches nor Support service requests for Free. The course CDB/PDB baseline is FREE/FREEPDB1. RMAN work is performed with SYSBACKUP or SYSDBA and never from the ServiceHub runtime account. Disk backup sets and image copies need filesystem/Fast Recovery Area capacity outside the SQL user-data model, so every lab begins with destination/free-space evidence. Mandatory diagnostics do not require AWR, ASH, Diagnostics Pack, Tuning Pack, RAC, Data Guard, Exadata, or a media-management vendor.
1. Physical and logical corruption are different failure classes
Physical corruption means the block structure cannot be trusted—for example invalid checksum, all-zero block, or inconsistent header/footer. Logical corruption means the physical block structure is intact but internal content is inconsistent, such as a malformed row piece or index entry.
RMAN validation checks physical corruption by default.
CHECK LOGICAL adds intrablock logical checks. It
cannot prove every interblock relational/business invariant in
an application.
2. Mandatory non-destructive PDB validation
VALIDATE PLUGGABLE DATABASE FREEPDB1;VALIDATE CHECK LOGICAL PLUGGABLE DATABASE FREEPDB1;
The command reads the PDB datafiles but does not create a
backup. On success, RMAN reports validation completion and block
counts. On detected corruption, RMAN records qualifying block
ranges in V$DATABASE_BLOCK_CORRUPTION and writes
diagnostic evidence to ADR.
3. Query the database corruption inventory
SELECT con_id, file#, block#, blocks, corruption_change#, corruption_typeFROM v$database_block_corruptionORDER BY con_id,file#,block#;
An empty result means no corrupt blocks are currently recorded in this view. It does not prove every byte, backup piece, index/table relationship, application invariant, or offsite copy is valid.
4. BACKUP VALIDATE reads files like a backup but writes no backup artifact
BACKUP VALIDATE CHECK LOGICAL PLUGGABLE DATABASE FREEPDB1;
BACKUP VALIDATE exercises the file-read path RMAN
would use for backup and reports corruption, but it
intentionally produces no backup set/image copy. Therefore it
cannot prove that yesterday's backup piece is still readable
today.
5. RESTORE VALIDATE tests existing backup artifacts
RESTORE PLUGGABLE DATABASE FREEPDB1 VALIDATE;
This is the correct escalation when the question is “can RMAN read the backup pieces needed for restore?” It can fail because a piece is missing/corrupt even while current database files validate successfully.
6. CROSSCHECK is an existence/status reconciliation, not a checksum scan
CROSSCHECK BACKUP;CROSSCHECK COPY;LIST EXPIRED BACKUP;LIST EXPIRED COPY;
CROSSCHECK asks the device/media manager whether each recorded
artifact exists/accesses as expected and marks missing records
EXPIRED. It does not read every data block in the
piece to prove restoration integrity.
7. Block media recovery repairs selected corrupt blocks where possible
Block media recovery (BMR) restores only
corrupt blocks from good backups/copies and applies redo to
recover them. The rest of the datafile can remain online,
reducing outage scope for isolated corruption. RMAN can recover
blocks explicitly or all eligible blocks recorded in
V$DATABASE_BLOCK_CORRUPTION.
RECOVER DATAFILE 7 BLOCK 12345;-- Or recover all eligible blocks in the corruption list:RECOVER CORRUPTION LIST;
Do not copy these numbers. Use exact file/block evidence from the target. Some logical corruptions cannot be fixed by BMR and may require object rebuild, table/tablespace recovery, or broader media recovery.
8. Deliberately wrong: corrupt a database block with an OS hex editor to practice BMR
Directly editing a datafile can damage neighboring blocks, metadata, encryption structures, or storage snapshots and can make an otherwise healthy lab unrecoverable. The mandatory course path never injects physical corruption into the only Free database.
Use an isolated clone/duplicate with a verified backup and disposable storage if a later advanced lab intentionally injects corruption. For this chapter, learn detection and recovery selection from documented evidence without destructive byte editing.
9. Backup optimization avoids redundant backups under specific rules
CONFIGURE BACKUP OPTIMIZATION ON lets RMAN skip
certain files that already have an identical usable backup on
the same device type according to RMAN's documented rules. This
can reduce I/O/storage, but it relies on repository/media state
and retention needs.
SHOW BACKUP OPTIMIZATION;-- Optional:-- CONFIGURE BACKUP OPTIMIZATION ON;
Optimization is not deduplication proof and does not mean “never back up unchanged files again.” Retention, device type, recovery window, FORCE clauses, archived-log rules, and media expiration all influence whether RMAN skips an object.
10. Validation matrix
| Technique | Answers | Does not prove |
|---|---|---|
LIST |
What repository records exist? | Media still exists/readable |
CROSSCHECK |
Can RMAN/media manager find the artifact? | Every block is valid |
VALIDATE DATABASE/PDB |
Are current files readable/physically (and optionally logically) valid? | Backup media is restorable |
RESTORE ... VALIDATE |
Can selected backups be read for restore? | Recovered application is correct/on-time |
| Actual restore/recover drill | Can system be materialized/recovered in a target environment? | All business workflows unless explicitly tested |
11. Production judgment
Schedule validation as part of a recoverability program, not as
a replacement for restore drills. Use logical checks where their
extra read/CPU cost fits the window, crosscheck storage/media
catalogs, and act on
V$DATABASE_BLOCK_CORRUPTION immediately. Keep
checksums enabled and investigate underlying storage when
corruption appears.
No pack or COMPATIBLE change is required for the
mandatory validation path. Lesson 5 now moves from “are backups
readable?” to the harder proof: can you meet a stated RPO/RTO,
recover to a chosen point, duplicate into isolation, and unlock
encrypted data after the original host is gone?
Check your understanding
- What does CHECK LOGICAL add to RMAN validation?
- Does CROSSCHECK read every database block inside a backup piece?
- What view records block ranges detected as corrupt by RMAN/database checks?
- When is block media recovery appropriate?
- Does a successful RESTORE VALIDATE prove the application RTO?
Review the answers
It adds logical intrablock consistency checks after physical checks pass.
No. CROSSCHECK reconciles repository/media availability/status rather than full block validation.
V$DATABASE_BLOCK_CORRUPTION.
For isolated blocks that are marked/detected corrupt and can be reconstructed from good backup/redo without broader file recovery.
No. It proves backup selection/readability, not full restore/recovery/startup/application validation time.
Authoritative references
- Validating Database Files and Backups — VALIDATE/BACKUP VALIDATE/RESTORE VALIDATE and corruption classes
- VALIDATE Reference — CHECK LOGICAL and PDB validation syntax
- Performing Block Media Recovery — BMR and V$DATABASE_BLOCK_CORRUPTION
- Maintaining RMAN Backups — CROSSCHECK/EXPIRED maintenance
- Configuring RMAN Environment — backup optimization policy