IBM Support

ANR0162W DB2 SQL2219 Reorg error

Troubleshooting


Problem

Reorg encounters DB2 error with SQL code -2219

Diagnosing The Problem

Review the Tivoli Storage Manager server activity logs for errors regarding the reorg operation. The error code returned from DB2 is 2219. For example:
03/18/2013 14:12:06 ANR0162W Supplemental database diagnostic
information: -2219: :1 (54534d4442312e42465f42495446494c455f45585-
4454e5453ff31).
03/18/2013 14:12:06 ANR9999D_0485338544 DoReorg(tbreorg.c:3035)
Thread<49>: Reorg(TblResume )(flags 0x100000) for
"TSMDB1"."BF_BITFILE_EXTENTS" failed with result code -2219.

The warning message ANR0162W is a generic message issued by the server to indicate that an error has occurred in DB2. Review the accompanying error messages to determine the cause of the DB2 operation failure. In this case, ANR9999D_0485338544 DoReorg was the failing operation. The DB2 SQL code was 2219.

SQL2219N specifies INPLACE table reorganization on table table-name is not allowed. There are multiple root causes for this kind of error. Review the db2diag.log for additional information. In the example shown above, here is the error seen in db2diag.log:
2013-03-18-14.12.06.362000-240 E85737213F614 LEVEL: Error
PID : 5700 TID : 9200 PROC : db2syscs.exe
INSTANCE: SERVER1 NODE : 000 DB : TSMDB1
APPHDL : 0-8991 APPID: *LOCAL.SERVER1.130318193119
AUTHID : TSMINST1
EDUID : 9200 EDUNAME: db2agent (TSMDB1)
FUNCTION: DB2 UDB, data management, sqldOLRValidate, probe:100
MESSAGE : ADM5590E The specified INPLACE table reorganization action on
table "TSMDB1 .BF_BITFILE_EXTENTS" is not allowed on this node because
of SQLCODE -2219 reason code "1".

Resolving The Problem

The example above showed reason code "1". Review the following documentation for explanations of different reason codes and the suggested solutions.
http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.messages.sql.doc/doc/msql02219n.html

For reason code "1":
Explanation
The statement cannot be processed because it violates a restriction as indicated by the following reason code:
1
Table reorganization cannot RESUME as the original data or index object has changed.
User response
1
Issue a STOP then a START.

A STOP and a START can be achieved by running the following DB2 commands:
db2 connect to tsmdb1
db2 set schema tsmdb1
db2 "reorg table tsmdb1.BF_BITFILE_EXTENTS inplace stop"
db2 "reorg table tsmdb1.BF_BITFILE_EXTENTS inplace start"

Assuming BF_BITFILE_EXTENTS is the table having the reorg issue (identified from db2diag.log).
The server can be up and running while running the db2 reorg commands.
For other reason codes, review the link above for the appropriate actions.

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

IBM Spectrum Protect

Document Information

Modified date:
17 June 2018

UID

swg21634521