|
set linesize 200 pagesize 1000 column day format a3 column total format 9999 column h00 format 999 column h01 format 999 column h02 format 999 column h03 format 999 column h04 format 999 column h04 format 999 column h05 format 999 column h06 format 999 column h07 format 999 column h08 format 999 column h09 format 999 column h10 format 999 column h11 format 999 column h12 format 999 column h13 format 999 column h14 format 999 column h15 format 999 column h16 format 999 column h17 format 999 column h18 format 999 column h19 format 999 column h20 format 999 column h21 format 999 column h22 format 999 column h23 format 999 column h24 format 999 break on report compute max of βtotalβ on report compute max of βh01β on report compute max of βh02β on report compute max of βh03β on report compute max of βh04β on report compute max of βh05β on report compute max of βh06β on report compute max of βh07β on report compute max of βh08β on report compute max of βh09β on report compute max of βh10β on report compute max of βh11β on report compute max of βh12β on report compute max of βh13β on report compute max of βh14β on report compute max of βh15β on report compute max of βh16β on report compute max of βh17β on report compute max of βh18β on report compute max of βh19β on report compute max of βh20β on report compute max of βh21β on report compute max of βh22β on report compute max of βh23β on report compute sum of NUM on report compute sum of GB on report compute sum of MB on report compute sum of KB on report
REM Redo Log Switch History
alter session set nls_date_format=βDD MON YYYYβ; select thread#, trunc(completion_time) as βdateβ, to_char(completion_time,βDyβ) as βDayβ, count(1) as βtotalβ, sum(decode(to_char(completion_time,βHH24β²),β00β,1,0)) as βh00β, sum(decode(to_char(completion_time,βHH24β²),β01β,1,0)) as βh01β, sum(decode(to_char(completion_time,βHH24β²),β02β,1,0)) as βh02β, sum(decode(to_char(completion_time,βHH24β²),β03β,1,0)) as βh03β, sum(decode(to_char(completion_time,βHH24β²),β04β,1,0)) as βh04β, sum(decode(to_char(completion_time,βHH24β²),β05β,1,0)) as βh05β, sum(decode(to_char(completion_time,βHH24β²),β06β,1,0)) as βh06β, sum(decode(to_char(completion_time,βHH24β²),β07β,1,0)) as βh07β, sum(decode(to_char(completion_time,βHH24β²),β08β,1,0)) as βh08β, sum(decode(to_char(completion_time,βHH24β²),β09β,1,0)) as βh09β, sum(decode(to_char(completion_time,βHH24β²),β10β,1,0)) as βh10β, sum(decode(to_char(completion_time,βHH24β²),β11β,1,0)) as βh11β, sum(decode(to_char(completion_time,βHH24β²),β12β,1,0)) as βh12β, sum(decode(to_char(completion_time,βHH24β²),β13β,1,0)) as βh13β, sum(decode(to_char(completion_time,βHH24β²),β14β,1,0)) as βh14β, sum(decode(to_char(completion_time,βHH24β²),β15β,1,0)) as βh15β, sum(decode(to_char(completion_time,βHH24β²),β16β,1,0)) as βh16β, sum(decode(to_char(completion_time,βHH24β²),β17β,1,0)) as βh17β, sum(decode(to_char(completion_time,βHH24β²),β18β,1,0)) as βh18β, sum(decode(to_char(completion_time,βHH24β²),β19β,1,0)) as βh19β, sum(decode(to_char(completion_time,βHH24β²),β20β,1,0)) as βh20β, sum(decode(to_char(completion_time,βHH24β²),β21β,1,0)) as βh21β, sum(decode(to_char(completion_time,βHH24β²),β22β,1,0)) as βh22β, sum(decode(to_char(completion_time,βHH24β²),β23β,1,0)) as βh23β from v$archived_log where dest_id = (select dest_id from V$ARCHIVE_DEST_STATUS where status=βVALIDβ and type=βLOCALβ) β and first_time > trunc(sysdate-10) group by thread#, trunc(completion_time), to_char(completion_time, βDyβ) order by 2,1;
REM Archive log generated / hour and day
select THREAD#, trunc(completion_time) as βDATEβ , count(1) num , trunc(sum(blocks*block_size)/1024/1024/1024) as GB , trunc(sum(blocks*block_size)/1024/1024) as MB , sum(blocks*block_size)/1024 as KB from v$archived_log where dest_id = (select dest_id from V$ARCHIVE_DEST_STATUS where status=βVALIDβ and type=βLOCALβ and rownum = 1) β first_time > trunc(sysdate-10) group by thread#, trunc(completion_time) order by 2,1 ;
|