Thursday, September 27, 2007

Script to check the status of running RMAN Backup and Recovery sessions

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"FROM V$SESSION_LONGOPSWHERE OPNAME LIKE 'RMAN%'AND OPNAME NOT LIKE '%aggregate%'AND TOTALWORK != 0AND SOFAR <> TOTALWORK;

2 comments:

Manuel said...

Is this complete? Seems like it will check the status of a RUNNING backup. Not the status (recoverable, expired, obsolete) of complete backups

sandarsh said...

Thats Correct , all we can infer with this script is wether the current slaves are doing the Job or Not. Once they complete the restore of all the files from the backup set the %completes becomes 100 and then again it starts from zero.