Subscribe YouTube Channel For More Live Tutorials

Script to find current rman backup status

Using v$session_longops view , we can the find the current running rman backup status associated with SID,SERIAL# and total work to completed and sofar completed.

prompt Current RMAN Backup Job Status
prompt '----------------------------'
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
/