This script will report on all backups – full, incremental and archivelog backups
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;
SQL> @backup_details.sql
SESSION_KEY INPUT_TYPE STATUS START_TIME END_TIME HRS
----------- ------------- --------- -------------- -------------- -------
165 ARCHIVELOG FAILED 03/25/18 19:28 03/25/18 19:28 .00
174 DB FULL FAILED 03/25/18 20:31 03/25/18 21:07 .61
180 ARCHIVELOG FAILED 06/16/18 15:12 06/16/18 15:12 .01
185 DB FULL COMPLETED 06/16/18 15:19 06/16/18 16:39 1.34
203 ARCHIVELOG FAILED 06/18/18 17:52 06/18/18 17:52 .00
210 DB FULL COMPLETED 06/18/18 18:02 06/18/18 19:14 1.20
6 rows selected.
SQL>
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;
SQL> @backup_details.sql
SESSION_KEY INPUT_TYPE STATUS START_TIME END_TIME HRS
----------- ------------- --------- -------------- -------------- -------
165 ARCHIVELOG FAILED 03/25/18 19:28 03/25/18 19:28 .00
174 DB FULL FAILED 03/25/18 20:31 03/25/18 21:07 .61
180 ARCHIVELOG FAILED 06/16/18 15:12 06/16/18 15:12 .01
185 DB FULL COMPLETED 06/16/18 15:19 06/16/18 16:39 1.34
203 ARCHIVELOG FAILED 06/18/18 17:52 06/18/18 17:52 .00
210 DB FULL COMPLETED 06/18/18 18:02 06/18/18 19:14 1.20
6 rows selected.
SQL>
No comments:
Post a Comment