ORASOLU TOOLBOX · BACKUP & RECOVERY

Backup Status

Practical Oracle SQL for reviewing recent backup status, completion times, backup types, availability and backup history.

ORASOLU TOOLBOX · BACKUP & RECOVERY

Check whether recent backups completed as expected

Backup status provides the first operational view of recovery readiness. Start with recent RMAN jobs, then review the backup sets, pieces and files that were produced and their current availability.

01 · JOB STATUS

Review recent backup status

Find recent RMAN jobs and identify completed, warning or failed operations.

SELECT
    session_key,
    input_type,
    status,
    start_time,
    end_time,
    time_taken_display
FROM v$rman_backup_job_details
ORDER BY start_time DESC
FETCH FIRST 20 ROWS ONLY;
02 · BACKUP TYPES

Review backup activity by type

Summarize recent RMAN activity by backup type and completion status.

SELECT
    input_type,
    status,
    COUNT(*) AS job_count,
    MIN(start_time) AS first_start,
    MAX(end_time) AS last_end
FROM v$rman_backup_job_details
GROUP BY
    input_type,
    status
ORDER BY
    input_type,
    status;
03 · BACKUP SETS

Review recent backup sets

Inspect completed backup sets, their type, level, piece count and duration.

SELECT
    set_stamp,
    set_count,
    backup_type,
    incremental_level,
    pieces,
    start_time,
    completion_time,
    elapsed_seconds
FROM v$backup_set
ORDER BY completion_time DESC
FETCH FIRST 20 ROWS ONLY;
04 · PIECE STATUS

Check backup piece availability

Review the status and storage location of recently created backup pieces.

SELECT
    set_stamp,
    set_count,
    piece#,
    device_type,
    handle,
    status,
    bytes,
    completion_time
FROM v$backup_piece
ORDER BY completion_time DESC
FETCH FIRST 20 ROWS ONLY;
05 · BACKUP FILES

Review backup file status

Inspect RMAN backup files and identify available, expired or unavailable entries.

SELECT
    backup_type,
    file_type,
    status,
    device_type,
    completion_time,
    bytes,
    fname
FROM v$backup_files
ORDER BY completion_time DESC
FETCH FIRST 30 ROWS ONLY;
06 · BACKUP HISTORY

Review recent backup volume

Compare recent backup jobs by input and output size to spot changes in backup volume.

SELECT
    input_type,
    start_time,
    end_time,
    input_bytes_display,
    output_bytes_display,
    compression_ratio
FROM v$rman_backup_job_details
WHERE status LIKE 'COMPLETED%'
ORDER BY start_time DESC
FETCH FIRST 20 ROWS ONLY;

ORASOLU TOOLBOX · BACKUP & RECOVERY

Backup status is more than a successful job message.

Confirm that recent jobs completed successfully, then check the backup sets and pieces created by those jobs. Availability and storage metadata provide another layer of evidence when validating whether backups can still be used for recovery.

Oracle documents V$RMAN_BACKUP_JOB_DETAILS as a view containing details about backup jobs, whileV$BACKUP_SET contains information about completed backup sets from the control file.