标签搜索

【oracle】关于日志产生量的计算

冰封一夏
2021-11-27 20:33:17 / 467 阅读 / 正在检测是否收录...



根据每日归档的生成量,可以反过来估计每日的数据库活动性及周期性,并决定空间分配的问题!
1.计算归档日志的生产量:
select name,completion_time,BLOCKS * BLOCK_SIZE/1024/1024 MB 
from v$archived_log 
where rownum
2.计算某日全天的日志生成计算:
select trunc(completion_time),sum(Mb)/1024 DAY_GB 
from(select name,completion_time,BLOCKS*BLOCK_SIZE/1024/1024 Mb from v$archived_log
where COMPLETION_TIME between trunc(sysdate - 2) and trunc(sysdate) - 1)
group by trunc(COMPLETION_TIME)

ops$admin@dw1>select trunc(completion_time),sum(Mb)/1024 DAY_GB 
  2  from(select name,completion_time,BLOCKS*BLOCK_SIZE/1024/1024 Mb from v$archived_log
  3  where COMPLETION_TIME between trunc(sysdate - 2) and trunc(sysdate) - 1)
  4  group by trunc(COMPLETION_TIME);

TRUNC(COMPLETION_T     DAY_GB
----------------------------     ----------
31-AUG-11                    511.713791
====3.最近日期的日志生成统计

select trunc(completion_time),sum(mb)/1024 day_gb

from(select name,completion_time,blocks*block_size /1024 /1024 mb from v$archived_log)
group by trunc(completion_time)
order by (trunc(completion_time))


25

评论

博主关闭了所有页面的评论