-
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
相关推荐
hey you~8 分钟前
云呼叫中心坐席自动分配实战:ACD 策略、Redis+Lua 实现与排查清单夜雪一千18 分钟前
MySQL 数据字典如何获得系统集成-鹰翔22 分钟前
ERP推单数据库怎么备份:SQLite WAL模式下只复制db文件为什么可能漏任务QianhangQianping24 分钟前
撤销重做不是「存快照」:一个可视化编辑器的Operation 设计honsor25 分钟前
用 Grafana 做温湿度异常检测:从阈值告警到趋势预测赵渝强老师38 分钟前
【赵渝强老师】YashanDB Developer Center(YDC,崖山数据库开发者中心)lusklusklusk40 分钟前
SQL Server 为什么普通 SELECT 会阻塞 UPDATE?——行级 S 锁到表级 S 锁的锁升级原理与实验验证Leo.yuan1 小时前
企业业务人员如何独立完成数据分析?2026年自助BI工具选型与应用指南roman_日积跬步-终至千里1 小时前
数仓开发的三层责任:业务定义、模型设计与 SQL 实现瀚高PG实验室1 小时前
瀚高数据库创建新数据库卡住问题排查