ON CALL DBA SUPPORT

— Database blog

Archive for January, 2011

ARCHIVE LOGS COUNT

Posted by ssgottik on 06/01/2011

ARCHIVE LOG COUNT CHECK—-AVERAGE OF 1 MONTH

select ‘+ Daily (max) : ‘||max(no)||’ switches. Size: ‘||round((max(no) * max(logsize ))/1024,2)||’Gb’||chr(10)||’+ Daily (avg) : ‘||trunc(avg(no))||’ switches. Size: ‘||round((avg(no) * max(logsize ))/1024,2)||’Gb’||chr(10)|| ‘+ Daily (min) : ‘||min(no)||’ switches. Size: ‘||round((min(no) * maxlogsize ))/1024,2)||’Gb’
from (
select trunc(FIRST_TIME,’DD’), count(*)  no
from v$log_history
where FIRST_TIME > sysdate – 30
group by trunc(FIRST_TIME,’DD’)),
(select max(bytes/1024/1024) logsize from v$log);

Advertisements

Posted in SCRIPTS | 1 Comment »