Was my rman backup successful?
I have more than 100 database servers.
How can I report if my backup was successful last night or last week?
Normally one can use shell scripts and grep rman log for errors but here is a better way.
select to_char(START_TIME,’DD MON YY HH24:Mi’) START_TIME ,
to_char(END_TIME,’DD MON YY HH24:Mi’) END_TIME ,
OUTPUT_BYTES/1000000 PROCESSED_IN_MB,STATUS
from v$rman_status where trunc(START_TIME)= trunc(sysdate)
Please edit trunc(sysdate) for DAY you need to see backup details
START_TIME END_TIME PROCESSED_IN_MB STATUS
————— ————— ————— ———————–
25 JAN 10 15:05 25 JAN 10 15:07 2041.57747 RUNNING
25 JAN 10 15:05 25 JAN 10 15:07 0 RUNNING
25 JAN 10 07:00 25 JAN 10 07:00 0 COMPLETED
25 JAN 10 14:50 25 JAN 10 14:51 0 FAILED
25 JAN 10 14:48 25 JAN 10 14:48 0 COMPLETED
25 JAN 10 07:00 25 JAN 10 07:00 0 COMPLETED
25 JAN 10 14:50 25 JAN 10 14:51 0 COMPLETED WITH ERRORS
25 JAN 10 07:00 25 JAN 10 07:00 0 COMPLETED WITH WARNINGS
25 JAN 10 14:48 25 JAN 10 14:48 0 COMPLETED
25 JAN 10 07:00 25 JAN 10 07:00 0 COMPLETED
I want to see if my backups are growing over time.
select trunc(START_TIME),sum(OUTPUT_BYTES)/1000000 PROCESSED_IN_MB
from v$rman_status where STATUS =’COMPLETED’
group by trunc(START_TIME)
order by 1 desc
TRUNC(START_TIME) PROCESSED_IN_MB 08/07/2010 0 07/07/2010 109935.0671 06/07/2010 50093.3591 05/07/2010 49868.96384 04/07/2010 49808.14643 03/07/2010 49803.95213 02/07/2010 49801.85498 01/07/2010 99461.10362 30/06/2010 51695.32109
select sum(OUTPUT_BYTES)/1000000 PROCESSED_IN_MB
from v$rman_status where STATUS =’COMPLETED’
select to_char(START_TIME,’DD MON YY HH24:Mi’) START_TIME ,STATUS,OPERATION
from v$rman_status where STATUS like ‘%ERROR%’
order by 1 desc
Leave a Reply
You must be logged in to post a comment.