SQL:
prompt
prompt ##############
prompt REDO GENERATED
prompt ##############
col thrd heading 'Instance' format '9'
col trans_day heading 'Day' format a6
col logs_mb heading 'Redo (MB)' format '9,999,999'
break on thrd skip 1
compute sum label 'Week Total' of logs_mb on thrd
select thrd,
to_char(transaction_day,'DY-DD') trans_day,
sum(log_size) logs_mb
from ( select distinct
thread# thrd,
sequence# sequence,
trunc(first_time) transaction_day,
round((blocks*block_size)/1048576) log_size
from v$archived_log
where first_time > sysdate - 7)
group by thrd,
transaction_day
order by thrd
/
Sample Output:
##############
REDO
GENERATED
##############
##############
Instance Day Redo (MB)
-------- ------ ----------
1 WED-08 38,913
THU-09 50,678
FRI-10 68,406
SAT-11 59,472
SUN-12 73,550
MON-13 48,961
TUE-14 81,264
WED-15 41,908
******** ----------
Week Tot 463,152
-------- ------ ----------
1 WED-08 38,913
THU-09 50,678
FRI-10 68,406
SAT-11 59,472
SUN-12 73,550
MON-13 48,961
TUE-14 81,264
WED-15 41,908
******** ----------
Week Tot 463,152
2 WED-08 130
THU-09 1,206
FRI-10 1,569
SAT-11 384
SUN-12 429
MON-13 295
TUE-14 457
WED-15 264
THU-09 1,206
FRI-10 1,569
SAT-11 384
SUN-12 429
MON-13 295
TUE-14 457
WED-15 264
No comments:
Post a Comment