Daily total archived log size on a RAC database
4 node RAC - CDB/PDB environment
I need a query to figure out history of total daily archived logs on all four RAC instances.
I have used the following two queries but wanted to confirm that it is accurate to find out daily archived log for the entire database for each day(all 4 instances). your guidance is appreciated.
SELECT TRUNC (COMPLETION_TIME, 'DD') Day,
ROUND (SUM (BLOCKS * BLOCK_SIZE) / 1024/1024/1024/1024, 2) TB,
COUNT (*) Archives_Generated
FROM v$archived_log
GROUP BY TRUNC (COMPLETION_TIME, 'DD')
ORDER BY 1 desc;
select trunc(completion_time) as "DATE"
, count(1) num
, trunc(sum(blocksblock_size)/1024/1024/1024) as GB