Monday, September 21, 2015

Oracle : Determine Backups/Restore Time


col OPNAME for a30
select OPNAME,SOFAR/TOTALWORK*100 PERCENT_SOFAR, trunc(TIME_REMAINING/60) TIME_REMAINING,
trunc(ELAPSED_SECONDS/60) TIME_CONSUMED
from v$session_longops where TOTALWORK>0 and OPNAME like '%RMAN%';

Output for above query

OPNAME                         PERCENT_SOFAR TIME_REMAINING TIME_CONSUMED
------------------------------ ------------- -------------- -------------
RMAN: incremental datafile bac           100              0             0
kup

RMAN: full datafile backup               100              0             0
RMAN: incremental datafile bac           100              0             0
kup

RMAN: full datafile backup               100              0             0
RMAN: full datafile backup               100              0             0
RMAN: full datafile backup               100              0             0
RMAN: archived log backup                100              0             0
RMAN: archived log backup                100              0             0
RMAN: archived log backup                100              0             0
RMAN: archived log backup                100              0             0


Understanding the Output

About v$session_longops : Please click here 

OPNAME : Shows the Brief description of the operation
PERCENT_SOFAR : Percentage completed sofar
TIME_REMAINING : Estimated remaining time to complete the job
TIME_CONSUMED : Elapsed Time for the job


You can alter the above query to find the time remaining for 'restore' work as well by substituting 'RMAN' with 'RESTORE'

No comments:

Post a Comment