Monitoring RMAN backup status using v$rman_backup_job_details and v$rman_status.
Note : - Enter the number of days required for status report, for 1 day backup status report provide input as '1'.
RMAN backup status using v$rman_backup_job_details :-
set pages 9999 lines 500
col INSTANCE for a9
col ELAPSED for a30
SELECT ( SELECT instance_name FROM v$instance)
|| ' '
|| ( SELECT instance_number FROM v$instance)
instance,
-- TO_CHAR (start_time, 'YYYY-MM-DD HH24:MI') start_time,
to_date (start_time, 'DD-MM-YYYY HH24:MI:SS') start_time,
TO_CHAR (output_bytes / 1048576, '999,999,999.9') output_mb,
TO_CHAR (output_bytes_per_sec / 1048576, '999,999.9') output_mb_per_sec,
time_taken_display elapsed,input_type,status
FROM v$rman_backup_job_details
where start_time >= sysdate - &NUMBER_OF_DAYS
ORDER BY start_time
/
RMAN backup status using v$rman_backup_job_details , v$rman_status:-
set pages 9999 lines 500
set numformat 99999.99
set trim on
set trims on
alter session set nls_date_format = 'DD-MM-YYYY HH24:MI:SS';
col INSTANCE for a9
col status for a22
col COMMAND_ID for a20
col INPUT_TYPE for a10
col OUTPUT_DEVICE_TYPE for a10
col OUTPUT_BYTES_PER_SEC_DISPLAY for a9
col status heading "BACKUP|STATUS"
col COMMAND_ID heading "BACKUP NAME"
col STARTED_TIME heading "START TIME"
COL END_TIME heading "END TIME"
col ELAPSED_TIME heading "MINUTES | TAKEN"
col INPUT_TYPE heading "INPUT|TYPE"
col OUTPUT_DEVICE_TYPE heading "OUTPUT|DEVICES"
col INPUT_SIZE heading "INPUT SIZE|GB"
col OUTPUT_SIZE heading "OUTPUT SIZE|GB"
col OUTPUT_BYTES_PER_SEC_DISPLAY heading "OUTPUT | RATE|(PER SEC)"
SELECT (SELECT instance_name FROM v$instance) || ' ' || (SELECT instance_number FROM v$instance) instance,rs.sid,
rj.COMMAND_ID,
rj.STATUS,
max(rj.START_TIME) STARTED_TIME,
rj.END_TIME,
rj.ELAPSED_SECONDS/60 ELAPSED_TIME,
rj.INPUT_TYPE,
rj.OUTPUT_DEVICE_TYPE,
rj.INPUT_BYTES/1024/1024/1024 INPUT_SIZE,
rj.OUTPUT_BYTES/1024/1024/1024 OUTPUT_SIZE,
rj.OUTPUT_BYTES_PER_SEC_DISPLAY
from v$rman_backup_job_details rj, v$rman_status rs
where rj.COMMAND_ID=rs.COMMAND_ID
group by
rs.sid,rj.COMMAND_ID,rj.STATUS,rj.START_TIME,rj.END_TIME,rj.ELAPSED_SECONDS,rj.INPUT_TYPE,rj.OUTPUT_DEVICE_TYPE,rj.INPUT_BYTES,rj.OUTPUT_BYTES,rj.OUT
PUT_BYTES_PER_SEC_DISPLAY
having max(rj.START_TIME) > sysdate-&NUMBER_OF_DAYS order by rj.START_TIME desc
/
BACKUP MINUTES INPUT OUTPUT INPUT SIZE OUTPUT
SIZE OUTPUT RATE
INSTANCE SID BACKUP NAME STATUS START TIME END TIME TAKEN TYPE DEVICES GB
GB (PER SEC)
Note : - Enter the number of days required for status report, for 1 day backup status report provide input as '1'.
RMAN backup status using v$rman_backup_job_details :-
set pages 9999 lines 500
col INSTANCE for a9
col ELAPSED for a30
SELECT ( SELECT instance_name FROM v$instance)
|| ' '
|| ( SELECT instance_number FROM v$instance)
instance,
-- TO_CHAR (start_time, 'YYYY-MM-DD HH24:MI') start_time,
to_date (start_time, 'DD-MM-YYYY HH24:MI:SS') start_time,
TO_CHAR (output_bytes / 1048576, '999,999,999.9') output_mb,
TO_CHAR (output_bytes_per_sec / 1048576, '999,999.9') output_mb_per_sec,
time_taken_display elapsed,input_type,status
FROM v$rman_backup_job_details
where start_time >= sysdate - &NUMBER_OF_DAYS
ORDER BY start_time
/
RMAN backup status using v$rman_backup_job_details , v$rman_status:-
set pages 9999 lines 500
set numformat 99999.99
set trim on
set trims on
alter session set nls_date_format = 'DD-MM-YYYY HH24:MI:SS';
col INSTANCE for a9
col status for a22
col COMMAND_ID for a20
col INPUT_TYPE for a10
col OUTPUT_DEVICE_TYPE for a10
col OUTPUT_BYTES_PER_SEC_DISPLAY for a9
col status heading "BACKUP|STATUS"
col COMMAND_ID heading "BACKUP NAME"
col STARTED_TIME heading "START TIME"
COL END_TIME heading "END TIME"
col ELAPSED_TIME heading "MINUTES | TAKEN"
col INPUT_TYPE heading "INPUT|TYPE"
col OUTPUT_DEVICE_TYPE heading "OUTPUT|DEVICES"
col INPUT_SIZE heading "INPUT SIZE|GB"
col OUTPUT_SIZE heading "OUTPUT SIZE|GB"
col OUTPUT_BYTES_PER_SEC_DISPLAY heading "OUTPUT | RATE|(PER SEC)"
SELECT (SELECT instance_name FROM v$instance) || ' ' || (SELECT instance_number FROM v$instance) instance,rs.sid,
rj.COMMAND_ID,
rj.STATUS,
max(rj.START_TIME) STARTED_TIME,
rj.END_TIME,
rj.ELAPSED_SECONDS/60 ELAPSED_TIME,
rj.INPUT_TYPE,
rj.OUTPUT_DEVICE_TYPE,
rj.INPUT_BYTES/1024/1024/1024 INPUT_SIZE,
rj.OUTPUT_BYTES/1024/1024/1024 OUTPUT_SIZE,
rj.OUTPUT_BYTES_PER_SEC_DISPLAY
from v$rman_backup_job_details rj, v$rman_status rs
where rj.COMMAND_ID=rs.COMMAND_ID
group by
rs.sid,rj.COMMAND_ID,rj.STATUS,rj.START_TIME,rj.END_TIME,rj.ELAPSED_SECONDS,rj.INPUT_TYPE,rj.OUTPUT_DEVICE_TYPE,rj.INPUT_BYTES,rj.OUTPUT_BYTES,rj.OUT
PUT_BYTES_PER_SEC_DISPLAY
having max(rj.START_TIME) > sysdate-&NUMBER_OF_DAYS order by rj.START_TIME desc
/
BACKUP MINUTES INPUT OUTPUT INPUT SIZE OUTPUT
SIZE OUTPUT RATE
INSTANCE SID BACKUP NAME STATUS START TIME END TIME TAKEN TYPE DEVICES GB
GB (PER SEC)
No comments:
Post a Comment