Disclaimer

Tuesday 17 August 2021

Check RMAN channel backup progress and waiting in Oracle


Check each channel progress for RMAN Backup in Oracle

Check the channel progress with help of gv$session_longops

set line 200 pages 200
col CLIENT_INFO format a20
col "% Complete" format 999.99
select s.inst_id, o.sid, CLIENT_INFO, context, sofar, totalwork,
                    round(sofar/totalwork*100,2) "% Complete"
     FROM gv$session_longops o, gv$session s
     WHERE opname LIKE 'RMAN%'
     AND opname NOT LIKE '%aggregate%'
     AND o.sid=s.sid
     AND totalwork != 0
     AND sofar <> totalwork;


Example :
INST_ID SID CLIENT_INFO CONTEXT SOFAR TOTALWORK % Complete---------- ------- --------------------- ---------- ---------- ---------- ---------- 1 5 rman channel=aux1 1 104367 45030696 .23 1 6 rman channel=aux9 1 133629 45030696 .30 1 81 rman channel=aux2 1 82413 45030696 .18 1 82 rman channel=aux10 1 89336 45030696 .20 1 161 rman channel=aux11 1 108471 45030696 .24 1 237 rman channel=aux12 1 73979 45030696 .16 1 315 rman channel=aux13 1 79734 45030696 .18 1 391 rman channel=aux3 1 75127 45030696 .17 1 392 rman channel=aux14 1 70778 45030696 .16 1 468 rman channel=aux15 1 65290 45030696 .14 1 544 rman channel=aux4 1 78580 45030696 .17 1 545 rman channel=aux16 1 68605 45030696 .15 1 621 rman channel=aux5 1 97275 45030696 .22 1 622 rman channel=aux17 1 69114 45030696 .15 1 698 rman channel=aux6 1 103829 45030696 .23 1 699 rman channel=aux18 1 75743 45030696 .17 1 776 rman channel=aux7 1 81244 45030696 .18 1 777 rman channel=aux19 1 120317 45030696 .27 1 853 rman channel=aux8 1 92669 45030696 .21 1 854 rman channel=aux20 1 74994 45030696 .17

Check Waiting Event time for RMAN Process

set line 200 pages 200
col CLIENT_INFO format a20
col event format a40
col seconds format 999999.99
select inst_id, sid, CLIENT_INFO, seq#, event, state, wait_time_micro/1000000 seconds
 from gv$session where program like '%rman%' and
wait_time = 0 and
 action is not null;

Check RMAN backup progress of each channel
Note: It include table backup progress also if backup_tape_io_slaves=TRUE:

select s.inst_id, a.sid, CLIENT_INFO Ch, a.STATUS,
open_time, round(BYTES/1024/1024,2) "SOFAR Mb" , round(total_bytes/1024/1024,2)
TotMb, io_count,
round(BYTES/TOTAL_BYTES*100,2) "% Complete" , a.type, filename
from gv$backup_async_io a,  gv$session s
where not a.STATUS in ('UNKNOWN')
and a.sid=s.sid and open_time > sysdate - 1;

Check Tape backup progress (only if backup_tape_io_slaves=FALSE)

select s.inst_id, a.sid, CLIENT_INFO Ch, filename, a.type, a.status, buffer_size bsz, buffer_count bfc,
open_time open, io_count
from gv$backup_sync_io a, gv$session s
where a.sid=s.sid and
open_time > sysdate - 1;


No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...