Andre Spadini
André Spadini | MultiCloud | DBA

André Spadini | MultiCloud | DBA

Oracle: RMAN Status

Oracle: RMAN Status

Verificando o status e porcentagem do RMAN.

Andre Spadini's photo
Andre Spadini

Published on Nov 2, 2021

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Query que exibe todos os jobs de RMAN e status

col STATUS format a9
col hrs format 999.99
select SESSION_KEY, 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;

     506674 DB FULL       COMPLETED 10/25/21 18:14 10/25/21 19:50    1.60
     507266 DB FULL       RUNNING   11/02/21 12:15 11/02/21 12:20     .09

Query que exibe o status do JOB e a porcetagem já realizada:

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;

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK % COMPLETE
---------- ---------- ---------- ---------- ---------- ----------
         6         13          1    9894896   77673322      12,74

Abs!

 
Share this