问题描述

接到某局点客户报障,在进行表重组时,出现错误,无法使表恢复到正常使用情况。

smbdb2:/smbrptdb/db2inst2$db2 reorg table als7.t_fact_loan;

SQL2216N SQL error "-289" occurred while reorganizing a database table or its

indexes.

故障处理过程

在处理有具体报错的问题时,通常都有迹可循。

1) 首先查看报错信息查看报错信息:db2 “? SQL289”

SQL0289N Unable to allocate new pages in table space

从报错代码中,我们先得到一个初步思路:数据库在进行reorg时,无法分配新的页,表空间方面可能存在问题。

2) db2数据库在进行操作时,会在db2diag.log文件中,记录较多的消息。检查报错时间段的数据库消息日志:db2diag -t 2017-01-05-21|more

2017-01-05-21.09.33.869329+480 E977654141A688 LEVEL: Warning

PID : 6881600 TID : 106290 PROC : db2sysc 0

INSTANCE: db2inst2 NODE : 000 DB : RPTDB

APPHDL : 0-45870 APPID: *LOCAL.db2inst2.170105124937

AUTHID : DB2INST2

EDUID : 106290 EDUNAME: db2agent (RPTDB) 0

FUNCTION: DB2 UDB, buffer pool services, sqlbIsSpaceOnPathForConts, probe:20

MESSAGE : ADM6101W While attempting to extend table space "RPTDB_TABLE" (ID