ORASOLU TOOLBOX · BACKUP & RECOVERY

Recovery Diagnostics

Practical Oracle SQL for reviewing recovery readiness, database recovery status, corruption, archive gaps and recovery area pressure.

ORASOLU TOOLBOX · BACKUP & RECOVERY

Check recovery readiness from multiple angles

Recovery diagnostics should combine database state, files requiring recovery, corruption checks, archived redo gaps, recovery area usage and recent RMAN activity. These queries provide a practical starting point for reviewing recovery readiness.

01 · DATABASE STATUS

Review database recovery state

Review the database role, open mode, logging mode and flashback status as the first recovery-readiness check.

SELECT
    name,
    db_unique_name,
    database_role,
    open_mode,
    log_mode,
    flashback_on
FROM v$database;

02 · RECOVERY FILES

Find files requiring recovery

Identify data files currently reported as requiring media recovery and review the associated recovery change and time.

SELECT
    file#,
    error,
    online_status,
    change#,
    time
FROM v$recover_file
ORDER BY file#;

03 · CORRUPTION

Check reported block corruption

Review blocks reported as corrupt by Oracle to identify files and block ranges that may require further investigation or recovery.

SELECT
    file#,
    block#,
    blocks,
    corruption_change#,
    corruption_type
FROM v$database_block_corruption
ORDER BY file#, block#;

04 · ARCHIVE GAPS

Check for archived redo gaps

Review archive gaps reported by Oracle, which can be important when validating redo availability for recovery or standby operations.

SELECT
    thread#,
    low_sequence#,
    high_sequence#
FROM v$archive_gap
ORDER BY thread#;

05 · RECOVERY AREA

Review recovery area pressure

Check recovery area capacity, current usage and reclaimable space to identify storage pressure that can affect recovery operations.

SELECT
    name,
    space_limit / 1024 / 1024 / 1024 AS limit_gb,
    space_used / 1024 / 1024 / 1024 AS used_gb,
    space_reclaimable / 1024 / 1024 / 1024 AS reclaimable_gb,
    number_of_files
FROM v$recovery_file_dest;

06 · RMAN ACTIVITY

Review recent RMAN operations

Review recent RMAN operations, their status and execution time to identify backup or recovery activity that needs attention.

SELECT
    operation,
    status,
    start_time,
    end_time,
    ROUND(
        (end_time - start_time) * 24 * 60,
        1
    ) AS duration_minutes
FROM v$rman_status
WHERE start_time >= SYSDATE - 7
ORDER BY start_time DESC;

ORASOLU TOOLBOX · BACKUP & RECOVERY

Recovery diagnostics should connect evidence.

Database state, files requiring recovery, corruption, archive gaps, recovery area usage and RMAN activity each show a different part of the recovery picture. Reviewing them together provides better operational context than relying on a single status check.

Use these queries as an investigation starting point and correlate the results with the recovery procedure, backup strategy and environment-specific configuration.