prompt
accept x_days prompt "Days [7]: " default 7
prompt
col "Time" for a10
col "In" for a20
col "Out" for a20
col "Day" for a4
col status for a12
col command_id for a20
select command_id, input_type, to_char( start_time, 'Dy' ) "Day", start_time, end_time, status, time_taken_display "Time",
input_bytes_display "In", output_bytes_display "Out", output_device_type
from v$rman_backup_job_details
where start_time > sysdate - &x_days
order by start_time;
prompt
prompt Non Full:
select command_id, input_type, to_char( start_time, 'Dy' ) "Day", start_time, end_time, status, time_taken_display "Time",
input_bytes_display "In", output_bytes_display "Out", output_device_type
from v$rman_backup_job_details
where start_time > sysdate - &x_days
and input_type <> 'DB FULL'
order by start_time;
prompt
prompt Full:
select command_id, input_type, to_char( start_time, 'Dy' ) "Day", start_time, end_time, status, time_taken_display "Time",
input_bytes_display "In", output_bytes_display "Out", output_device_type
from v$rman_backup_job_details
where start_time > sysdate - &x_days
and input_type = 'DB FULL'
order by start_time;
Example output:
SQL> @rmans
Days [7]:
COMMAND_ID INPUT_TYPE Day START_TIME END_TIME STATUS Time In Out OUTPUT_DEVICE_TYP
-------------------- ------------- ---- ------------------- ------------------- ------------ ---------- -------------------- -------------------- -----------------
DEV2R2.online DB FULL Mon 28/09/2015 20:25:19 28/09/2015 20:28:32 COMPLETED 00:03:13 16.79G 8.92G SBT_TAPE
DEV2R1.archlogs ARCHIVELOG Mon 28/09/2015 22:41:43 28/09/2015 22:43:06 COMPLETED 00:01:23 443.93M 444.25M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Wed 30/09/2015 02:08:10 30/09/2015 02:11:14 COMPLETED 00:03:04 594.39M 594.75M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Wed 30/09/2015 23:53:33 01/10/2015 00:00:58 COMPLETED 00:07:25 316.18M 316.50M SBT_TAPE
DEV2R1.online DB FULL Thu 01/10/2015 20:25:58 01/10/2015 20:30:20 COMPLETED 00:04:22 16.79G 8.93G SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Thu 01/10/2015 22:42:19 01/10/2015 22:43:33 COMPLETED 00:01:14 432.98M 433.50M SBT_TAPE
DEV2R1.archlogs ARCHIVELOG Fri 02/10/2015 22:41:43 02/10/2015 22:44:17 COMPLETED 00:02:34 438.50M 438.75M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Sat 03/10/2015 22:43:07 03/10/2015 22:44:42 COMPLETED 00:01:35 450.88M 451.50M SBT_TAPE
DEV2R1.online DB FULL Sun 04/10/2015 20:32:45 04/10/2015 20:43:00 COMPLETED 00:10:15 16.79G 8.93G SBT_TAPE
DEV2R1.archlogs ARCHIVELOG Sun 04/10/2015 22:41:50 04/10/2015 22:43:25 COMPLETED 00:01:35 465.95M 466.25M SBT_TAPE
10 rows selected.
Non Full:
COMMAND_ID INPUT_TYPE Day START_TIME END_TIME STATUS Time In Out OUTPUT_DEVICE_TYP
-------------------- ------------- ---- ------------------- ------------------- ------------ ---------- -------------------- -------------------- -----------------
DEV2R1.archlogs ARCHIVELOG Mon 28/09/2015 22:41:43 28/09/2015 22:43:06 COMPLETED 00:01:23 443.93M 444.25M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Wed 30/09/2015 02:08:10 30/09/2015 02:11:14 COMPLETED 00:03:04 594.39M 594.75M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Wed 30/09/2015 23:53:33 01/10/2015 00:00:58 COMPLETED 00:07:25 316.18M 316.50M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Thu 01/10/2015 22:42:19 01/10/2015 22:43:33 COMPLETED 00:01:14 432.98M 433.50M SBT_TAPE
DEV2R1.archlogs ARCHIVELOG Fri 02/10/2015 22:41:43 02/10/2015 22:44:17 COMPLETED 00:02:34 438.50M 438.75M SBT_TAPE
DEV2R2.archlogs ARCHIVELOG Sat 03/10/2015 22:43:07 03/10/2015 22:44:42 COMPLETED 00:01:35 450.88M 451.50M SBT_TAPE
DEV2R1.archlogs ARCHIVELOG Sun 04/10/2015 22:41:50 04/10/2015 22:43:25 COMPLETED 00:01:35 465.95M 466.25M SBT_TAPE
7 rows selected.
Full:
COMMAND_ID INPUT_TYPE Day START_TIME END_TIME STATUS Time In Out OUTPUT_DEVICE_TYP
-------------------- ------------- ---- ------------------- ------------------- ------------ ---------- -------------------- -------------------- -----------------
DEV2R2.online DB FULL Mon 28/09/2015 20:25:19 28/09/2015 20:28:32 COMPLETED 00:03:13 16.79G 8.92G SBT_TAPE
DEV2R1.online DB FULL Thu 01/10/2015 20:25:58 01/10/2015 20:30:20 COMPLETED 00:04:22 16.79G 8.93G SBT_TAPE
DEV2R1.online DB FULL Sun 04/10/2015 20:32:45 04/10/2015 20:43:00 COMPLETED 00:10:15 16.79G 8.93G SBT_TAPE
3 rows selected.
No hay comentarios:
Publicar un comentario