暂无图片
分享
2021-03-01
oracle 在windows server下,经常出现大量log file sync,偶尔出现Disk file operations I/O,导致数据库卡死,只能重启服务恢复。

*** 2021-03-01 15:27:20.724
Process diagnostic dump for ORACLE.EXE (ARC0), OS id=6708,
pid: 39, proc_ser: 17, sid: 673, sess_ser: 203

current sql:
Current Wait Stack:
0: waiting for ‘rdbms ipc message’
timeout=0x7186, =0x0, =0x0
wait_id=22 seq_num=23 snap_id=1
wait times: snap=7.582141 sec, exc=7.582141 sec, total=7.582141 sec
wait times: max=4 min 50 sec, heur=7.582141 sec
wait counts: calls=1 os=3
in_wait=1 iflags=0x5a8
Wait State:
fixed_waits=0 flags=0x22 boundary=0x0000000000000000/-1
Session Wait History:
elapsed time of 0.000081 sec since current wait
0: waited for ‘ARCH wait for archivelog lock’
=0x0, =0x0, =0x0
wait_id=21 seq_num=22 snap_id=1
wait times: snap=0.000012 sec, exc=0.000012 sec, total=0.000012 sec
wait times: max=infinite
wait counts: calls=0 os=0
occurred after 0.000009 sec of elapsed time
1: waited for ‘Disk file operations I/O’
FileOperation=0x5, fileno=0x0, filetype=0x3
wait_id=20 seq_num=21 snap_id=1
wait times: snap=0.001665 sec, exc=0.001665 sec, total=0.001665 sec
wait times: max=infinite
wait counts: calls=0 os=0
occurred after 0.000006 sec of elapsed time
2: waited for ‘log file sequential read’
log#=0x0, block#=0x1, blocks=0x1
wait_id=19 seq_num=20 snap_id=1
wait times: snap=0.000082 sec, exc=0.000082 sec, total=0.000082 sec
wait times: max=infinite
wait counts: calls=0 os=0
occurred after 0.000011 sec of elapsed time
3: waited for ‘Disk file operations I/O’
FileOperation=0x2, fileno=0x0, filetype=0x3
wait_id=18 seq_num=19 snap_id=1
wait times: snap=0.052757 sec, exc=0.052757 sec, total=0.052757 sec
wait times: max=infinite
wait counts: calls=0 os=0
occurred after 0.000093 sec of elapsed time

收藏
分享
20条回答
默认
最新

不知道是不是和系统的io有关,业务量也不大

暂无图片 评论
暂无图片 有用 0
文成

传个awr看看

暂无图片 评论
暂无图片 有用 0

重启了服务,看不到之前的awr了
image.png

暂无图片 评论
暂无图片 有用 0
你好我是李白

那就传离故障最近的不跨越数据库重启的awr呗,结合数据库的dba_hist_active_sess_history以及数据库日志看看能不能找出一些蛛丝马迹。

暂无图片 评论
暂无图片 有用 0
暂无图片 评论
暂无图片 有用 0

重启服务后的第一个awr报告

暂无图片 评论
暂无图片 有用 0
你好我是李白

awr显示重启后压力不大,一些内存增长以及物理读特征符合重启后重新缓存执行计划、数据块等。

发生问题前的最近的awr以及问题前的一小段时间的dba_hist_active_sess_history有信息吗?
以及数据库alert日志有相关报错吗?

暂无图片 评论
暂无图片 有用 0

使用该sql查询故障时间的数据
SELECT T.INSTANCE_NUMBER,
T.SQL_ID,
T1.SQL_TEXT,
T.EVENT,
T.SESSION_STATE,
T.BLOCKING_SESSION,
T.MACHINE,
COUNT(1)
FROM DBA_HIST_ACTIVE_SESS_HISTORY T, GV$SQL T1
WHERE T.SQL_ID = T1.SQL_ID
AND T.INSTANCE_NUMBER = T1.INST_ID
AND T.SAMPLE_TIME >= TO_DATE(‘20210301 15:00;00’, ‘YYYYMMDD HH24:MI;SS’)
AND T.SAMPLE_TIME <= TO_DATE(‘20210301 16:00;00’, ‘YYYYMMDD HH24:MI;SS’)
GROUP BY T.INSTANCE_NUMBER,
T.SQL_ID,
T.EVENT,
T.SESSION_STATE,
T.BLOCKING_SESSION,
T1.SQL_TEXT,
T.MACHINE
ORDER BY COUNT(1) DESC;

如图:
image.png

暂无图片 评论
暂无图片 有用 0

数据库alert日志没看到相关报错日志

暂无图片 评论
暂无图片 有用 0
你好我是李白

可以根据下面简单几个步骤查询DBA_HIST_ACTIVE_SESS_HISTORY辅助判断是否能发现一些蛛丝马迹。
第一,查询故障前等待事件总趋势,例如:

select trunc(sample_time,'mi'),count(1) from dba_hist_active_sess_history
where sample_time > to_date('20200412 20:00:00','yyyymmdd hh24:mi:ss')
and sample_time < to_date('20200412 21:00:00','yyyymmdd hh24:mi:ss')
and event is not null group by trunc(sample_time,'mi')
having count(1) > 2 order by 1; 

第二,查询等待事件详细分布,例如:

select trunc(sample_time,'mi'),event,count(1)
 from dba_hist_active_sess_history
 where sample_time > to_date('20200412 20:20:00','yyyymmdd hh24:mi:ss')
 and sample_time < to_date('20200412 20:30:00','yyyymmdd hh24:mi:ss')
 and event is not null 
 group by trunc(sample_time,'mi'),event
having count(1) > 2 order by 1,3;

第三,根据趋势判断有无异常,如果有异常时间段,那就根据具体时间段再进一步查询dba_hist_active_sess_history视图一些重要的字段即可,判断有无异常之处。

**
假如故障是周期性发生,建议对操作系统资源进行监控。**

暂无图片 评论
暂无图片 有用 0

出现了null event
image.png
image.png

暂无图片 评论
暂无图片 有用 0
你好我是李白

数据库具体是几点重启的呢?
数据库卡死,操作系统表现怎么样呢?

看这数据,一个小时也没采到多少数据,详细查查DBA_HIST_ACTIVE_SESS_HISTORY的一些具体列呗,
比如
sample_time
session_id
blocking_session
sql_opname
sql_id
event
p1
p2
p3
program
module
action
machine
pga_allocated

暂无图片 评论
暂无图片 有用 0
暂无图片 评论
暂无图片 有用 0

数据库是20210301 15:27 重启的

暂无图片 评论
暂无图片 有用 0
你好我是李白
暂无图片 评论
暂无图片 有用 0
你好我是李白
暂无图片 评论
暂无图片 有用 0

是出现了bug吗

暂无图片 评论
暂无图片 有用 0
你好我是李白

目前没查到相关的bug,不排除,11.2.0.1版本确实bug多一些。

目前的信息来看,没法定位跟进一步判断,重启前数据库数据,操作系统数据基本没有。

暂无图片 评论
暂无图片 有用 0

好的,多谢大佬帮助,等下次出现故障的时候,我收集awr报告看下

暂无图片 评论
暂无图片 有用 0
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
附件列表
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏