Backup is very important part of oracle database.Being Oracle DBA, Regularly we are doing backup of oracle database for recovery. To check the status of rman backup job we can use below script. We can use view v$rman_status, v$rman_backup_job_details and V$SESSION_LONGOPS to monitor the current executing RMAN jobs and the status of the previously completed backups.
Check RMAN Backup completion details.
SQL>select (select NAME from v$database) Instance, object_type,operation,status,session_stamp,
round((end_time - start_time) * 24 * 60, 2) Elapsed_Time,
decode(to_char(start_time, 'd'), 1, 'Sunday', 2, 'Monday',
3, 'Tuesday', 4,'Wednesday',
5, 'Thursday', 6, 'Friday',
7, 'Saturday') dow,
to_char(start_time, 'mm/dd/yyyy hh:mi:ss') start_time,
to_char(end_time, 'mm/dd/yyyy hh:mi:ss') end_time,
round((input_bytes/(1024*1024*1024)),2) input_gb,
round((output_bytes/(1024*1024*1024)),2) output_gb
from v$rman_status
where start_time > trunc(sysdate-10) and operation = 'BACKUP';
Check Oracle Database RMAN Backup and Restore Operations progress.
SQL>select SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,sysdate + TIME_REMAINING/3600/24 end_at
from v$session_longops where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%';
For rman backup you may check at ⇒⇒ RMAN Backup scripts
Check RMAN Backup completion details.
SQL>select (select NAME from v$database) Instance, object_type,operation,status,session_stamp,
round((end_time - start_time) * 24 * 60, 2) Elapsed_Time,
decode(to_char(start_time, 'd'), 1, 'Sunday', 2, 'Monday',
3, 'Tuesday', 4,'Wednesday',
5, 'Thursday', 6, 'Friday',
7, 'Saturday') dow,
to_char(start_time, 'mm/dd/yyyy hh:mi:ss') start_time,
to_char(end_time, 'mm/dd/yyyy hh:mi:ss') end_time,
round((input_bytes/(1024*1024*1024)),2) input_gb,
round((output_bytes/(1024*1024*1024)),2) output_gb
from v$rman_status
where start_time > trunc(sysdate-10) and operation = 'BACKUP';
Check Oracle Database RMAN Backup and Restore Operations progress.
SQL>select SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,sysdate + TIME_REMAINING/3600/24 end_at
from v$session_longops where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%';
For rman backup you may check at ⇒⇒ RMAN Backup scripts
No comments:
Post a Comment
Thanks for reading till end. I hope this will help you more to improve your knowledge.
Now it's your turn!
What do you think? Share your experience in the comments box and subscribe for more interesting post.