awr 无法生成处理
2015-10-26 07:59
183 查看
客户数据库遇到AWR快照无法生成的问题,下面记录了下处理的过程。
OS:Linux
DB:Oracle 10.2.0.5 RAC
查看mmon文件,发现以下内容:
在之前尝试了MOS文档中的处理办法:
尝试了truncate wri$_optstat_histhread_history问题依旧,不知道是不是没有把数据库启动到restricted模式下进行操作的原因
文章转载于http://www.cddba.com/2013/09/27/awr%e6%97%a0%e6%b3%95%e7%94%9f%e6%88%90%e5%bf%ab%e7%85%a7%e5%a4%84%e7%90%86/
OS:Linux
DB:Oracle 10.2.0.5 RAC
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 | CURTIME Inst:Sid ID1 ID2 LMODE TYPE CTIME-------------------------- --------------------- ---------- ---------- ---------- ---- ----------20130927 16:45:19 Holder: 2:811 0 0 4 WF 243628820130927 16:45:19 Holder: 1:945 0 0 4 WF 243628720130927 16:45:19 Waiter: 2:709 0 0 0 WF 120130927 16:45:19 Holder: 1:945 9155 0 6 TM 243628720130927 16:45:19 Waiter: 2:811 9155 0 0 TM 2436287 /*WF AWR Flush MMON (Manageability Monitor) is attempting the autoflush function which means that we are trying to flush the ASH (Active Session History) data into the AWR (Active Workload Repository) for the historical repository.We take out the WF enqueue for doing this and hence in your wait sessions you may see WF enqueue contention.*/ SQL> select * from v$locked_object 2 XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME OS_USER_NAME PROCESS LOCKED_MODE---------- ---------- ---------- ---------- ---------- ------------------------------ ------------------------------ ------------ ----------- 10 11 5977841 9155 945 oracle 10185 6 10 11 5977841 9228 945 oracle 10185 3 SQL> SQL> select owner,object_name,object_type from dba_objects where object_id in ('9155','9228'); OWNER OBJECT_NAME OBJECT_TYPE------------------------------ -------------------------------------------------------------------------------- -------------------SYS WRH$_ACTIVE_SESSION_HISTORY TABLESYS WRM$_DATABASE_INSTANCE TABLE SQL> SQL> SQL> SELECT s.event event, 2 SUBSTR(s.program, 1, 39) program, 3 s.sid || ':' || s.SERIAL# || ':' || 4 DECODE(sql_hash_value, 0, prev_hash_value, sql_hash_value) || ':' || 5 decode(sql_id, null, prev_sql_id, sql_id) "SESS:SERIAL#:SQL_HASH:SQL_ID", 6 s.username, 7 SUBSTR(s.osuser || '@' || s.machine || '@' || s.process || '@' || 8 p.spid, 9 1, 10 60) "OSUSER@MACHINE@PROCEE@SPID", 11 BLOCKING_SESSION_STATUS, 12 blocking_session, 13 TO_CHAR(s.logon_time, 'mm-dd hh24:mi') logon_time 14 FROM v$session s, v$process p 15 where S.PADDR = P.ADDR 16 and s.wait_class <> 'Idle' 17 order by logon_time; EVENT PROGRAM SESS:SERIAL#:SQL_HASH:SQL_ID USERNAME OSUSER@MACHINE@PROCEE@SPID BLOCKING_SESSION_STATUS BLOCKING_SESSION LOGON_TIME-------------------------- ----------------------------------- -------------------------------------------------- ------------------------------ --------------------------------- ----------------------- ---------------- ---------------------------------------------------------------------------gc current request oracle@dbserver1 (m000) 945:12572:0: oracle@dbserver1@10185@10185 UNKNOWN 08-30 12:00 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | *** 2013-09-27 16:37:39.385 *** KEWRAFC: Flush slave failed, AWR Enqueue Timeout *** 2013-09-27 16:38:39.431 *** KEWRAFC: Flush slave failed, AWR Enqueue Timeout *** 2013-09-27 16:39:39.471 *** KEWRAFC: Flush slave failed, AWR Enqueue Timeout *** 2013-09-27 16:40:41.216 *** KEWRAFC: Flush slave failed, AWR Enqueue Timeout -----kill 掉m000进程 [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ ps -ef|grep m0 oracle 10185 1 99 Aug30 ? 28-05:04:19 ora_m000_orcl1 oracle 21027 30461 0 17:10 pts/2 00:00:00 grep m0 [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ kill -9 10185 [oracle@dbserver1 osw]$ ps -ef|grep m0 oracle 21118 30461 0 17:10 pts/2 00:00:00 grep m0 [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ ps- ef|grep pmon -bash: ps-: command not found [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ ps -ef|grep pmon oracle 15120 1 0 Aug25 ? 00:16:00 ora_pmon_orcl1 oracle 21221 30461 0 17:10 pts/2 00:00:00 grep pmon [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ [oracle@dbserver1 osw]$ ---awr生成快照正常 SQL> SQL> select snap_id,instance_number, 2 to_char(begin_interval_time, 'yyyy-mm-dd hh24:mi:ss') begin_interval_time, 3 to_char(end_interval_time, 'yyyy-mm-dd hh24:mi:ss') end_interval_time 4 from dba_hist_snapshot 5 order by snap_id,instance_number; SNAP_ID INSTANCE_NUMBER BEGIN_INTERVAL_TIME END_INTERVAL_TIME ---------- --------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- 6519 2 2013-08-30 11:00:28 2013-08-30 12:00:31 6520 1 2013-08-30 12:00:31 2013-09-27 17:10:41 6520 2 2013-08-30 12:00:31 2013-09-27 17:10:41 6521 1 2013-09-27 17:10:41 2013-09-27 17:13:47 6521 2 2013-09-27 17:10:41 2013-09-27 17:13:47 SQL> SQL> |
1 2 3 4 5 | MOS: WHEN AWR SNAPSHOTS ARE NOT GENERATED AUTOMATICALLY, HOW To DIAGNOSE. (文档 ID 787409.1)中的方法 1. Take backup of table SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY , Do create table as select of the table. 2. Start the database in restricted mode alter table sys.WRI$_OPTSTAT_HISTHEAD_HISTORY move; 3. Monitor the trace files |
文章转载于http://www.cddba.com/2013/09/27/awr%e6%97%a0%e6%b3%95%e7%94%9f%e6%88%90%e5%bf%ab%e7%85%a7%e5%a4%84%e7%90%86/
相关文章推荐
- cin、cin.get()、getline()(讲解的很详细)黄刚的博客
- hdu1087 dp
- Linux 中 df 命令的11个例子
- Linux 中 df 命令的11个例子
- *LeetCode-4Sum
- zoj 1048 该题的要求是求出12个数字的平均数
- UI基础篇-------UITabBarController的使用
- 网上的一个helpdesk流程,将来备用
- poj 1166 The Clocks 暴力搜索
- 《算法竞赛入门经典》(第2版)第二章习题
- cell的框架结构
- TypeScript学习笔记(五):接口
- 模拟赛记录(1):10.24 T3 有趣的有趣的家庭菜园 (线段树优化DP)
- 如何快速定位自己热爱的工作
- control + D 退出linux 当前命令(行)
- OSChina 周一乱弹 —— 六天颓废一天看剧
- 网页 基础
- 前端优化带来的思考,浅谈前端工程化
- 拇指接龙游戏升级记录01(CocoStudio 1.4.0.1+Cocos2d-x 2.2.3=>Cocos Studio 2.3.2+Cocos2d-x 3.8.1)
- 快讯:农作物精准育种技术的重大进展