Data Corruption Prevention, Detection, and Repair

Data corruption, defined as the unintentional alteration of data caused by hardware, software, or human errors, poses a critical threat to the integrity of database environments. To combat this pervasive concern, Oracle provides robust mechanisms built on three fundamental pillars: Prevention, Detection, and Repair.

Data Corruption Types

Summary of Data Corruption Types

Type Typical Source/Cause Detected by Symptom
Physical corruption Hardware/storage Oracle block reads and meta data checks and checksum Read errors, corrupted structure
Logical corruption Software/memory Oracle consistency checks including checking internal data structures Data exists, but is inconsistent/logically invalid
Lost write corruption Storage, I/O path Data Guard real time apply or recovery and Oracle sophisticated block versioning checks The block version is older than the redo expectations

Physical Block Corruption

These errors occur when a database block’s structure is physically damaged or rendered unreadable. Such corruption is typically a result of hardware failures (for example: disk errors, controller faults, faulty cables).

Examples:

Characteristics:

Description of corruption-physical.png follows

Description of the illustration corruption-physical.png

Logical Block Corruption

In contrast to physical corruption, logical corruption arises when a block’s physical structure is intact and readable, but its internal contents are inconsistent with Oracle’s expected logical rules or metadata. These are commonly indicative of software bugs or memory-related issues. Logical block corruptions can be intra-block logical corruptions where the logical corruption is self-contained in single data block, and inter-block logical corruptions where data inconsistencies between 2 or more independent data blocks.

Examples:

Characteristics:

Description of corruption-logocal.png follows

Description of the illustration corruption-logocal.png

Lost Write Corruption

A lost write corruption occurs when a database block modification is acknowledged as successfully written by the storage sub-system, but the actual data is never persistently stored on disk or I/O being “lost”. This results in the on-disk block image being older than the database expects, creating a crucial consistency mismatch.

Examples:

Characteristics:

Description of corruption-lostwrite.png follows

Description of the illustration corruption-lostwrite.png

Summary of Oracle Data Corruption Resiliency Capabilities

Proactive prevention, vigilant detection, and proper use of Oracle’s built-in repair features form a comprehensive defense against data corruption in Oracle databases.

Pillar Features, Tools, and Best Practices Purpose
Prevention

Software Update Practices, Testing, Use Recommended Database Parameters

Oracle Active Data Guard, Exadata, Recovery Appliance

For details see Preventing Data Corruption

Avoid corruption from happening or avoid corruption from impacting your application
Detection

Recommended Database Parameters, Database and System Alerting, RMAN

Oracle Active Data Guard, Recovery Appliance, Exadata

For details see Detecting Data Corruption

Find corruption early, notify, and take action
Repair

Oracle Active Data Guard, or GoldenGate, ASM and Exadata, RMAN

For details see Repairing Data Corruption

Minimize impact; restore data and automatically repair (that is, Automatic Block Repair), aligning the solution with the lowest downtime and data loss

Preventing Data Corruption

Prevention aims to proactively stop corruption before it can occur.

Best Practices and Oracle Features

Key Database Configuration Parameters for Data Corruptions Protection

Oracle Integrity Tools and Features

Detecting Data Corruption

Corruption detection focuses on identifying corruption as soon as it occurs or before it can cause widespread damage.

The following are best practices and Oracle features to detect data corruption.

Repairing Data Corruption

Repair strategies focus on restoring or correcting corrupted data after it has been identified, minimizing impact or working around the corrupted data, and attempting to re-establish data integrity.

The following are best practices and Oracle features to repair data corruption.

References