28 October 2015

Archivelog generation

Hello friends, today again comes a post related to my favorite topic "Oracle Dataguard"
This may or may not be a useful context, but I have this script handy to check the amount of archives generated in the database, just to have a rough estimation of archive generation in the database over a period of time. Hope you might find it useful.

Archivelog generation on a daily basis:

alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';

set pages 1000
select trunc(COMPLETION_TIME,'DD') Day, thread#, round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives_Generated from v$archived_log group by trunc(COMPLETION_TIME,'DD'),thread# order by 1;


Archive log generation on an hourly basis:

set pages 1000
select trunc(COMPLETION_TIME,'HH') Hour,thread# , round(sum(BLOCKS*BLOCK_SIZE)/1048576) MB,count(*) Archives from v$archived_log group by trunc(COMPLETION_TIME,'HH'),thread#  order by 1 ; 

No comments:

Post a Comment