ITPub博客

首页 > 数据库 > Oracle > AWR不能自动生成快照解决方法

AWR不能自动生成快照解决方法

Oracle 作者:desert_xu 时间:2018-09-09 20:20:15 0 删除 编辑

AWR不能自动生成快照解决方法

问题描述:RAC归档满后,出现AWR不能自动生成快照。经原理应该是MMON HANG住导致,所以尝试重启MMON后问题解决。;


MMON HANG解决办法

1)重启一下mmon的刷新 
alter system set "_swrf_mmon_flush"=false; 
alter system set "_swrf_mmon_flush"=true; 


2)或者,找到mmon进程杀掉,让数据库自动重启一个新的mmon进程,或者重启下实例。 
ps -ef|grep mmon 
kill -9 xxxxxx 


Manageability Monitor Processes (MMON and MMNL)
The manageability monitor process (MMON) performs many tasks related to the Automatic Workload Repository (AWR). For example, MMON writes when a metric violates its threshold value, taking snapshots, and capturing statistics value for recently modified SQL objects.


The manageability monitor lite process (MMNL) writes statistics from the Active Session History (ASH) buffer in the SGA to disk. MMNL writes to disk when the ASH buffer is full.


See Also:
"Automatic Workload Repository (AWR)" and "Active Session History (ASH)"




AWR和ASH后台运行进程
AWR ==>MMON
ASH ==>MMNL


MMON负责执行与AWR相关的任务。包括收集数据库统计信息,收集AWR快照,启动各种自动维护作业JOB,生成超过阀值告警信息。
MMNL负责执行与ASH相关的任务。

###之前MOS 专家咨询的记录

1. Please provide the below script output on failed instance:<info.html>

conn / as sysdbaset pages 1000set num 20

alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

alter session set nls_timestamp_format='yyyy-mm-dd hh24:mi:ss.ff';

alter session set nls_timestamp_tz_format='yyyy-mm-dd hh24:mi:ss.ff tzh:tzm';

set mark html onspool info.html

select * from (select t.*, rank() over(partition by dbid, instance_number order by begin_interval_time desc) r from dba_hist_snapshot t) where r < 100;

select * from wrm$_wr_control where dbid = (select dbid from v$database);

select * from gv$database;

select * from gv$thread;show parameter statistics_level

show parameter control_management_pack_accessspool off

exit

2. Provide the "awrinfo" script output on instance

3: <awrinfo.txt>

SQL> conn / as sysdbaSQL> @?/rdbms/admin/awrinfo.sql

3. Enable SQL tracing on MMON slaves to collect more information. (do this in all instances)

begin

dbms_monitor.serv_mod_act_trace_enable(service_name => 'SYS$BACKGROUND'

,module_name => 'MMON_SLAVE'

,action_name => 'Auto-Flush Slave Action'

,waits => true

,binds => true);

end;

/

begin

dbms_monitor.serv_mod_act_trace_enable(service_name => 'SYS$BACKGROUND',

module_name => 'MMON_SLAVE'

,action_name => 'Remote-Flush Slave Action',

waits => true,binds => true);

end;

/

Wait for 2 snapshots time then upload the MMON (xxxx_mmon_xxxx.trc) and the below mmon slave trace files.

egrep -l "Auto-Flush Slave Action|Remote-Flush Slave Action" *.trc | xargs tar -cvf - | gzip > trace.tar.gzls -l trace.tar.gzTo disable the tracing later,

use "dbms_monitor.serv_mod_act_trace_disable" instead. for example:

begin

dbms_monitor.serv_mod_act_trace_disable(service_name => 'SYS$BACKGROUND',

module_name => 'MMON_SLAVE',

action_name => 'Auto-Flush Slave Action');

end;

/

begin

dbms_monitor.serv_mod_act_trace_disable(service_name => 'SYS$BACKGROUND',

module_name => 'MMON_SLAVE',

action_name => 'Remote-Flush Slave Action');

end;

/


########################################################################################
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!【QQ交流群:53993419】
QQ:14040928 E-mail:dbadoudou@163.com
本文链接: http://blog.itpub.net/26442936/viewspace-2125130/

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21980353/viewspace-2213845/,如需转载,请注明出处,否则将追究法律责任。

上一篇: powermt 命令简介
请登录后发表评论 登录
全部评论

注册时间:2013-10-23

  • 博文量
    79
  • 访问量
    243135