Saturday, July 20, 2013

How long has my backup/recovery job got to go

When running a rman command we can track the process via v$session_longops.

Note that this is the current operation that rman is running, not necessarily when you backup
or restore is going to complete. As a backup or restore may have multiple operations (eg. restore datafiles then recover archive logs).

SELECT SID, SERIAL#, MESSAGE, 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;





******************************************
 keywords: rman longops
******************************************
rdbms version: 11G
******************************************

No comments: