问题:
Db2 10.5.0.10, purescale 环境,离线备份报错 SQL2048N RC=5,对象是"DMS.TABLESPACE.DATA",而且不是一开始就报错,而是备到一半的时候才报错,备份中断。
$ db2 backup db sample to /dev/null
SQL2048N An error occuried while accessing object "DMS.TABLESPACE.DATA"
Reason code : "5"
同一个实例下面另外一套库没有问题。
db2diag.log:
2020-12-10-22.58.33.984858+480 I36963E507 LEVEL: Severe
PID : 14106 TID : 140180472194816 PROC : db2sysc 0
INSTANCE: db2inst NODE : 000 DB : SAMPLE
HOSTNAME: HOST01
EDUID : 1201 EDUNAME: db2pfchr (SAMPLE) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbDMSMapAndRead, probe:3459
MESSAGE : Extent read attempt failed.
DATA #1 : unsigned integer, 8 bytes
1
DATA #2 : unsigned integer, 8 bytes
1
DATA #3 : unsigned integer, 2 bytes
2
2020-12-10-22.58.33.985672+480 I37471E189 LEVEL: Severe
PID:14106 TID:140180472194816 NODE:000 Title: BUFFER
Dump File:/home/db2inst/sqllib/db2dump/DIAG0000/14106.1201.000.dump.bin
2020-12-10-22.58.34.004979+480 E37661E685 LEVEL: Severe
PID : 14106 TID : 140211027699456 PROC : db2sysc 0
INSTANCE: db2inst NODE : 000 DB : SAMPLE
APPHDL : 0-2238 APPID: *N0.db2inst.201210144752
AUTHID : db2inst HOSTNAME: HOST01
EDUID : 1228 EDUNAME: db2bm.1130.0 (SAMPLE) 0
FUNCTION: DB2 UDB, database utilities, sqlubResizeBufSpace, probe:632
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-2048
DATA #2 : Hexdump, 28 bytes
0x00007F780CC12230 : 00F8 FFFF 444D 532E 5441 424C 4553 5041 ....DMS.TABLESPA
0x00007F780CC12240 : 4345 2E44 4154 4100 0500 0000 CE.DATA.....
2020-12-10-22.58.34.005299+480 E38347E984 LEVEL: Severe
PID : 14106 TID : 140211027699456 PROC : db2sysc 0
INSTANCE: db2inst NODE : 000 DB : SAMPLE
APPHDL : 0-2238 APPID: *N0.db2inst.201210144752
AUTHID : db2inst HOSTNAME: HOST01
EDUID : 1228 EDUNAME: db2bm.1130.0 (SAMPLE) 0
FUNCTION: DB2 UDB, database utilities, sqlubResizeBufSpace, probe:632
MESSAGE : SQL2048N An error occurred while accessing object "". Reason code:
"".
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -2048 sqlerrml: 21
sqlerrmc: DMS.TABLESPACE.DATA 5
sqlerrp : sqlubRes
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2020-12-10-22.59.12.733785+480 E39332E464 LEVEL: Severe
PID : 14106 TID : 140180660938496 PROC : db2sysc 0
INSTANCE: db2inst NODE : 000 DB : SAMPLE
APPHDL : 0-2238 APPID: *N0.db2inst.201210144752
AUTHID : db2inst HOSTNAME: HOST01
EDUID : 1130 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:1080
MESSAGE : Backup terminated.
解决方案:
数据库实际上没有问题,应该是DB2的ARPR,解决方案是设置db2set变量
DB2_BCKP_PAGE_VERIFICATION=FALSE
重启实例后离线备份正常。