How to check RMAN log file and Backup status in Oracle

It is very easy to monitor RMAN backup status and see the log file if you have redirected RMAN output to a log file before running the jobs.

If you have not redirected the output to the log file, still we have some commands using which you can easily monitor the status of the jobs. Here we will discuss step by step procedure using which you can easily trace RMAN logs if its running fine or stuck in between.

Steps to check the RMAN backup job details.

STEP 1:  To find the status of the jobs:

set lines 300
col STATUS format a22
col hrs format 999.99
select
SESSION_KEY, SESSION_RECID, SESSION_STAMP,INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
STEP 2:  Check the % completed and more detailed information:

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND (SOFAR/TOTALWORK*100, 2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK! = 0 AND SOFAR <> TOTALWORK;
STEP 3: Check the logs or output of the running RMAN jobs 
set lines 200
set pages 1000
select output from GV$RMAN_OUTPUT
where session_recid = &SESSION_RECID
and session_stamp = &SESSION_STAMP
order by recid;

NOTE: Please enter SESSION_RECID and SESSION_STAMP from the 1st query mentioned in step 1.