[20181024]修改awr收集信息设置.txt SCOTT@test01p> @ ver1 PORT_STRING VERSION BANNER CON_ID -------------------- ---------- ---------------------------------------------------------------------------- ------ IBMPC/WIN_NT64-9.1.0 12.2.0.1.0 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0 SCOTT@test01p> select * from dba_hist_wr_control; DBID SNAP_INTERVAL RETENTION TOPNSQL CON_ID ---------- ----------------- ----------------- ------- ------ 2286984624 +00000 01:00:00.0 +00008 00:00:00.0 DEFAULT 0 --//缺省1小时建立一个snapshot,保留8天. --//生产系统这样设置不合理,建议修改保留45-60天:,假设修改60天(我感觉设置65条比较合适). SYS@book> select 60*24*60 from dual ; 60*24*60 ---------- 86400 --//65*24*60 = 93600,65天相当于93600分钟。 --//实际上我最想了解的是topnsql的缺省到底是多少,看dbms_workload_repository可以发现如下内容。 -- topnsql (NUMBER) - Top N SQL size. The number of Top SQL -- to flush for each SQL criteria -- (Elapsed Time, CPU Time, Parse Calls, -- Shareable Memory, Version Count). -- -- The value for this setting will be not -- be affected by the statistics/flush level -- and will override the system default -- behavior for the AWR SQL collection. The -- setting will have a minimum value of 30 -- and a maximum value of 50000. -- -- IF NULL is specified, the -- current value is preserved. -- -- topnsql (VARCHAR2) - Users are allowed to specify the following -- values: ('DEFAULT', 'MAXIMUM', 'N') -- -- Specifying 'DEFAULT' will revert the system -- back to the default behavior of Top 30 for -- level TYPICAL and Top 100 for level ALL. -- -- Specifying 'MAXIMUM' will cause the system -- to capture the complete set of SQL in the -- cursor cache. Specifying the number 'N' is -- equivalent to setting the Top N SQL with -- the NUMBER type. -- -- Specifying 'N' will cause the system -- to flush the Top N SQL for each criteria. -- The 'N' string is converted into the number -- for Top N SQL. --//statistics_level=TYPICAL的情况下(一般很少人改这个参数),default=30有点小,建议设置100-200之间。 --//最大也就是50000. SYS@test> execute dbms_workload_repository.modify_snapshot_settings( interval => 60,retention => 93600,topnsql => 200); PL/SQL procedure successfully completed. SCOTT@test01p> select * from dba_hist_wr_control; DBID SNAP_INTERVAL RETENTION TOPNSQL CON_ID ---------- ----------------- ----------------- ---------- ------ 2286984624 +00000 01:00:00.0 +00065 00:00:00.0 200 0 --//估计sysaux空间消耗,可以执行: @$ORACLE_HOME/rdbms/admin/utlsyxsz.sql
[20181024]修改awr收集信息设置.txt
来源:这里教程网
时间:2026-03-03 12:07:23
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- oracle视图
oracle视图
26-03-03 - oralce简单条件查询练习
oralce简单条件查询练习
26-03-03 - oracle实例名查询、实例状态查询等
oracle实例名查询、实例状态查询等
26-03-03 - ORA-1122/ORA-1208 数据文件头写丢失故障
ORA-1122/ORA-1208 数据文件头写丢失故障
26-03-03 - impdp导入提示ORA-39087和ORA-39070错误
impdp导入提示ORA-39087和ORA-39070错误
26-03-03 - oracle分组查询
oracle分组查询
26-03-03 - 如何在Word2010中进行邮件合并收件人排序
如何在Word2010中进行邮件合并收件人排序
26-03-03 - 如何在Word2010文档中使用书签
如何在Word2010文档中使用书签
26-03-03 - Debian screen命令详解(终端多路复用入门与实战指南)
Debian screen命令详解(终端多路复用入门与实战指南)
26-03-03 - oracle第一天
oracle第一天
26-03-03
