ORASOLU TOOLBOX · BACKUP & RECOVERY

RMAN Database Backup

Practical Oracle SQL for reviewing RMAN backup jobs, backup sets, backup pieces, throughput and current RMAN activity.

ORASOLU TOOLBOX · BACKUP & RECOVERY

Start with the backup job

RMAN backup history provides a useful starting point for understanding what was backed up, when it ran, how much data was processed and whether the operation completed successfully.

01 · BACKUP JOBS

Review recent RMAN backup jobs

Review recent RMAN backup jobs, their status, duration, backup type and the amount of data processed.

SELECT
    session_key,
    input_type,
    status,
    start_time,
    end_time,
    ROUND(elapsed_seconds / 60, 1) AS elapsed_minutes,
    input_bytes_display,
    output_bytes_display
FROM v$rman_backup_job_details
ORDER BY start_time DESC
FETCH FIRST 20 ROWS ONLY;
02 · RMAN STATUS

Review RMAN operation status

Inspect finished and currently running RMAN operations and identify warnings or failures.

SELECT
    session_recid,
    session_stamp,
    operation,
    status,
    start_time,
    end_time,
    input_bytes,
    output_bytes,
    output_device_type
FROM v$rman_status
WHERE row_level = 1
ORDER BY start_time DESC
FETCH FIRST 20 ROWS ONLY;
03 · BACKUP SETS

Review recent backup sets

Review completed backup sets, their type, incremental level, piece count and completion time.

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 · BACKUP PIECES

Inspect RMAN backup pieces

Inspect backup piece handles, device type, status, size and completion time when tracing backup files.

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

Review backup size and throughput

Compare input and output sizes, throughput and compression across recent RMAN backup jobs.

SELECT
    session_key,
    input_type,
    status,
    input_bytes_display,
    output_bytes_display,
    input_bytes_per_sec_display,
    output_bytes_per_sec_display,
    compression_ratio
FROM v$rman_backup_job_details
ORDER BY start_time DESC
FETCH FIRST 20 ROWS ONLY;
06 · RMAN OUTPUT

Review current RMAN output

Review messages reported by active RMAN operations when additional runtime context is needed.

SELECT
    session_key,
    sid,
    recid,
    stamp,
    output
FROM v$rman_output
ORDER BY stamp DESC
FETCH FIRST 50 ROWS ONLY;

ORASOLU TOOLBOX · BACKUP & RECOVERY

A successful backup job is only the beginning.

Review the job status and timing first, then examine the backup sets and pieces that were produced. Throughput, output size and RMAN messages can provide additional context when a backup is slower than expected or does not complete normally.

Oracle documents V$RMAN_BACKUP_JOB_DETAILS as a view containing details about RMAN backup jobs, whileV$RMAN_STATUS contains finished and ongoing RMAN operations.