MERCADOS FINANCIEROS

miércoles, 6 de mayo de 2020

Monitorear Backups - Restore RMAN

col rj_sid head "SID" for 999999
col rj_serial head "Serial" for 999999
col rj_context head "Context" for 999999
col rj_sofar head "so far" for 99999999
col rj_totalwork head "Total" for 999999999
col rj_completed head "Completed" for 99.99
col rj_opname head "Operation" for a50
col rj_remain head "Remain" format a10

SELECT SID rj_sid,
  serial# rj_serial,
  CONTEXT rj_context,
  sofar rj_sofar,
  totalwork rj_totalwork,
  ROUND (sofar / totalwork * 100, 2) rj_completed,
  opname rj_opname,
  TO_CHAR(TRUNC(time_remaining            /60/60),'09')
  ||TO_CHAR(TRUNC(mod(time_remaining,3600)/60),'09')
  ||TO_CHAR(mod(mod(time_remaining,3600),60),'09') rj_remain
   FROM v$session_longops
  WHERE opname LIKE 'RMAN%'
AND totalwork != 0
AND sofar     <> totalwork
ORDER BY 1;

No hay comentarios: