注册
数据库日志分析:[ERROR] database P0000003341 T0000000000000508844 Lob rec page check fail. page
专栏/Database Thinking/ 文章详情 /

数据库日志分析:[ERROR] database P0000003341 T0000000000000508844 Lob rec page check fail. page

胡li 2022/01/13 2537 5 0
摘要 2022-01-07 12:10:02.958 [ERROR] database P0000003341 T0000000000000508844 Lob rec page check fail. page(7, 0, 633357), blobid4430781 7表示表空间号;0表示文件号;633357表示页号 可以使用dd命令输出日志消息:dd if=数据文件 of=page.tmp bs=页大小 count=1 skip=页号

段落引用数据库日志报错【ERROR】错误,我们需要排查是否影响正常使用,或者产生了坏数据。需要sql跟踪日志进行协助排查,sql跟踪日志默认是关闭的,打开方式请查看另外一篇文章–DM8 开启 sql跟踪日志。以下内容分享日志里报错的分析步骤:

可通过以下sql语句定位到报错的是哪张表

select * from user_objects where object_id =(select obj_id from V$SEGMENT_INFOS where seg_id=(select SF_PAGE_GET_SEGID(7, 0, 633357)))

详细sql语句可以根据报错日志中的T0000000000000508844,末尾508844为线程号,去sql跟踪日志中定位到。

根据报错的线程号去sql跟踪日志查到如下结果:

2022-01-07 12:10:02.957 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035783803 stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15) [ORA]: update "OA"."M_REV_MN" set "FD_ID"=?"FD_FRONTEND"=?,"DOC_DELETE_BY"=? where "FD_ID"=? and "FD_ID"=?
2022-01-07 12:10:02.958 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035783803 stmt:NULL appname:manager.exe)  GET_LOB_DATA
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035783803 stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15)  FREE STMT
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035783803 stmt:NULL appname:manager.exe)  MSG: ROLLBACK
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035783803 stmt:NULL appname:manager.exe)  TRX: ROLLBACK
	行 29
2022-01-07 12:10:10.827 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:0 stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15) [ORA]: update "OA"."M_RW_MN" set "FD_ID"=?,"FD_FRONTEND"=?,"DOC_DELETE_BY"=? where "FD_ID"=? and "FD_ID"=?
2022-01-07 12:10:10.827 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035801164 stmt:NULL appname:manager.exe)  TRX: START
2022-01-07 12:10:10.828 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035801164 stmt:NULL appname:manager.exe)  GET_LOB_DATA
2022-01-07 12:10:10.829 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035801164 stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15)  FREE STMT
2022-01-07 12:10:10.829 (EP[0] sess:0xffd0388013e8 thrd:**508844** user:OA trxid:1035801164 stmt:NULL appname:manager.exe)  MSG: ROLLBACK
2022-01-07 12:10:10.829 (EP[0] sess:0xffd0388013e8 thrd:**508844 **user:OA trxid:1035801164 stmt:NULL appname:manager.exe)  TRX: ROLLBACK

根据时间定位到是update语句,再根据sql日志中的trxid:1035783803定位到如下SQL

2022-01-07 12:09:57.509 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:NULL appname:manager.exe)  TRX: START
2022-01-07 12:10:02.957 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15) [ORA]: update "OA"."M_RW_MN" set "FD_ID"=?,"SYNC_DATA_TO_CALENDAR_TIME"=?"DOC_DELETE_TIME"=?,"FD_SIGN_ENABLE"=?,"FD_FRONTEND"=?,"DOC_DELETE_BY"=? where "FD_ID"=? and "FD_ID"=?
2022-01-07 12:10:02.958 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:NULL appname:manager.exe)  GET_LOB_DATA
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:0xffd038840be0 appname:manager.exe ip:::ffff:x.x.x.15)  FREE STMT
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:NULL appname:manager.exe)  MSG: ROLLBACK
2022-01-07 12:10:02.959 (EP[0] sess:0xffd0388013e8 thrd:508844 user:OA **trxid:1035783803** stmt:NULL appname:manager.exe)  TRX: ROLLBACK

可以看到我们操作这条update sql的对象是管理工具(appname:manager.exe),ip地址是x.x.x.15(ip:::ffff:x.x.x.15),用户名是OA(user:oa)。我们目前能确定以下因素时间,操作机器,sql,可以找到操作人员沟通具体情况,再进行下一步分析了。

评论
后发表回复

作者

文章

阅读量

获赞

扫一扫
联系客服