DB2文件损坏修复一例

一天同事用图形工具尝试列出数据库的tablespace时报错SQL0970N 系统尝试写入只读文件。

查看db2diag.log

[@more@]

2009-10-19-13.56.01.593616+480 E3060522565E589 LEVEL: Warning
PID : 6879 TID : 46926678452544PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : QALOGDB
APPHDL : 0-2070 APPID: *LOCAL.db2inst1.091019055732
AUTHID : DB2INST1
EDUID : 239 EDUNAME: db2agent (QALOGDB) 0
36535,49 36%
[5] 0x00002AAC8255E848 sqloSystemErrorHandler + 0x6C0
[6] 0x00002AAC81E6CD7A sqloqualifydir + 0x3B2
[7] 0x00002AAC81E1911C /opt/ibm/db2/V9.5/lib64/libdb2.so.1 + 0x3EC11C
[8] 0x00002AAC81E19345 /opt/ibm/db2/V9.5/lib64/libdb2.so.1 + 0x3EC345
[9] 0x00002AAC81E17F8A sqlecdbd + 0xDE

2009-10-19-13.42.20.552635+480 E3060519536E870 LEVEL: Error (OS)
PID : 30984 TID : 46920462707072PROC : db2fmp (
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
DIA8701C Access denied for resource "", operating system return code
was "".
CALLED : OS, -, open OSERR: EACCES (13)
DATA #1 : Codepath, 8 bytes
4:12:18:23:37
DATA #2 : File name, 41 bytes
/data/db2inst1/NODE0000/sqldbdir/sqldbdir
DATA #3 : Bitmask, 4 bytes
0x00000354
DATA #4 : Hex integer, 4 bytes
0x000001B4
DATA #5 : signed integer, 4 bytes
0
DATA #6 : signed integer, 4 bytes
0
DATA #7 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.

2009-10-19-13.42.20.552837+480 I3060520407E1517 LEVEL: Error (OS)
PID : 30984 TID : 46920462707072PROC : db2fmp (
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, open OSERR: EACCES (13)
DATA #1 : String, 139 bytes
A total of 2 analysis will be performed :
- User info
- Path access permission

Target file = /data/db2inst1/NODE0000/sqldbdir/sqldbdir

DATA #2 : String, 188 bytes
Real user ID of current process = 1097
Effective user ID of current process = 1097
Real group ID of current process = 1040
Effective group ID of current process = 1040
DATA #3 : String, 230 bytes
Information of each subdirectory leading up to the first inaccessible one is shown in the format below :
:: (subdirectories)

1096:0:700 (data)

Cannot descend any further than the above subdirectory.
CALLSTCK:
[0] 0x00002AAC81DE3303 pdOSSeLoggingCallback + 0x91
[1] 0x00002AAC833079EB /opt/ibm/db2/V9.5/lib64/libdb2osse.so.1 + 0x1AD9EB
[2] 0x00002AAC83308DCB ossLogSysRC + 0xBF
[3] 0x00002AAC832FC510 /opt/ibm/db2/V9.5/lib64/libdb2osse.so.1 + 0x1A2510
[4] 0x00002AAC832FAB21 ossErrorAnalysis + 0x25
[5] 0x00002AAC8255E848 sqloSystemErrorHandler + 0x6C0
[6] 0x00002AAC81E69BEF sqloopenp + 0x335
[7] 0x00002AAC81E1B99A _Z8sqlegopnPcP12SQLO_FHANDLEc + 0x7E
[8] 0x00002AAC81E1A113 _Z8sqledogdP8SQLE_BWAcc + 0x1BF
[9] 0x00002AAC82366EE6 sqlederd + 0x4A

看上去就是文件权限不对,然后在我仔细逐层查看权限后确发现权限都正确.感觉就是文件本身有问题,问了一下同事果然是刚恢复的数据库。

我尝试用sqldbbak恢复

mv sqldbdir sqldbdir.old

cp sqldbbak sqldbdir

再让重试,问题解决。

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

转载于:http://blog.itpub.net/598443/viewspace-1028558/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值