DB2 - Problem description
Problem IT05797 | Status: Closed |
ALTER TABLE STATEMENT RESULTS IN SQLCODE -901 OR POSSIBLE OBJECT TABLE CORRUPTION | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
On a partitioned database environment (DPF), the execution of an ALTER TABLE statement that includes an ADD COLUMN operation to add a LONG VARCHAR, LONG VARGRAPHIC, BLOB, or XML type column, and also includes an ALTER COLUMN operation may result in corruption of the table space's object table. On fix pack 5, the ALTER TABLE command will fail with an SQLCODE -901 reporting "No lobID given and not allowed to pick" or "No longID given and not allowed to pick", and the object table will not be affected. For example: SQL0901N The SQL statement or command failed because of a database system error. (Reason "No lobID given and not allowed to pick".) SQLSTATE=58004 Prior to fix pack 5, the command will appear to be successful but may result in corruption of the object table, such that subsequent data definition (DDL) statements against that table space may result in severe errors in the db2diag.log with messages from function sqldObjTabInsertRID and subsequent "Bad Data Page" messages. For example: 2014-10-24-09.52.33.000685-240 I1131455 LEVEL: Severe PID : 16777254 TID : 38683 PROC : db2sysc 1 INSTANCE: db2user NODE : 001 DB : SAMPLE APPHDL : 0-46976 APPID: 9.26.97.151.59645.1410651 AUTHID : DB2USER HOSTNAME: largenode41 EDUID : 38683 EDUNAME: db2agntp (SAMPLE) 1 FUNCTION: DB2 UDB, data management, sqldObjTabInsertRID, probe:1596 ... 2014-10-24-09.57.48.014105-240 I11A581 LEVEL: Severe PID : 16777254 TID : 38683 PROC : db2sysc 1 INSTANCE: db2user NODE : 001 DB : SAMPLE APPHDL : 0-46976 APPID: 9.26.97.151.59645.1410651 AUTHID : DB2USER HOSTNAME: largenode41 EDUID : 38683 EDUNAME: db2agntp (SAMPLE) 1 FUNCTION: DB2 UDB, data management, sqldotblInsert, probe:1 RETCODE : ZRC=0x87040001=-2029780991=SQLD_BADPAGE "Bad Data Page" DIA8500C A data file error has occurred, record id is "". | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DPF only * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to the latest fix pack. * **************************************************************** | |
Local Fix: | |
To prevent this problem, split any vulnerable ALTER TABLE statements into two separate statements. Do not use ALTER COLUMN and ADD COLUMN of a long char type in the same statement. Prior to fix pack 5, if you suspect you have hit this issue, contact DB2 Support for assistance in recovering your table. | |
Solution | |
Problem was first fixed in DB2 UDB Version 10.5 fix pack 7 | |
Workaround | |
Replace all ALTER TABLE statements containing both ALTER COLUMN and ADD COLUMN with separate statements for each. | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 26.11.2014 19.01.2016 27.04.2016 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |