-
Gather daily history of primary database's redo generation rate using this query.
COPY
SQL> select trunc(completion_time) as "DATE", count(*) as "LOG SWITCHES", round(sum(blocks*block_size)/1024/1024) as "REDO PER DAY (MB)" from v$archived_log where dest_id=1 group by trunc(completion_time) order by 1; -
Gather the peak redo rate for each hour.
COPY
select begin_time,instance_number,metric_name, round(value/1024/1024) "Max Rate in MB" from (select to_char(begin_time,'DD-MON-YYYY HH24') begin_time,instance_number,metric_name,max(value) value from dba_hist_sysmetric_history where metric_name = 'Redo Generated Per Sec' and trunc(begin_time) >=trunc(sysdate-7) group by to_char(begin_time,'DD-MON-YYYY HH24'),instance_number,metric_name) order by 1,3;Optionally change the '7' to some other value to change the number of days in the output.
The preferred query is
dba_hist_sysmetric_historybecause it provides more precise information, but the retention is limited by AWR retention. If the dates you are looking for are not available form the previous query, gather per log redo generation rate usingv$archived_loginstead.COPY
SQL> alter session set nls_date_format='YYYY/MM/DD HH24:MI:SS'; SQL> select thread#,sequence#,blocks*block_size/1024/1024 MB,(next_time-first_time)*86400 sec, blocks*block_size/1024/1024)/((next_time-first_time)*86400) "MB/s" from v$archived_log where ((next_time-first_time)*86400<>0) and first_time between to_date('2024/10/15 08:00:00','YYYY/MM/DD HH24:MI:SS') and to_date('2024/11/15 11:00:00','YYYY/MM/DD HH24:MI:SS') and dest_id=1 order by first_time; -
Gather hourly snapshots of the redo generation rate from the Automatic Workload Repository (AWR) report 6 hours before the start of any redo or transport lag.
By default, Oracle Database automatically generates snapshots once every hour; however, you may want to manually create snapshots to capture statistics at times different from those of the automatically generated snapshots. To view information about an existing snapshot, use the
DBA_HIST_SNAPSHOTview.
oracle日志生成量
好记忆不如烂笔头abc2025-12-25 8:39
相关推荐
jiayou6411 小时前
KingbaseES 实战:深度解析数据库对象访问权限管理李广坤1 天前
MySQL 大表字段变更实践(改名 + 改类型 + 改长度)爱可生开源社区2 天前
2026 年,优秀的 DBA 需要具备哪些素质?随逸1773 天前
《从零搭建NestJS项目》加号33 天前
windows系统下mysql多源数据库同步部署シ風箏3 天前
MySQL【部署 04】Docker部署 MySQL8.0.32 版本(网盘镜像及启动命令分享)李慕婉学姐3 天前
Springboot智慧社区系统设计与开发6n99s526(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。百锦再3 天前
Django实现接口token检测的实现方案tryCbest3 天前
数据库SQL学习jnrjian3 天前
ORA-01017 查找机器名 用户名 以及library cache lock 参数含义