DB2 - Problem description
Problem IC78251 | Status: Closed |
ADMIN_MOVE_TABLE PROCEDURE RETURNS SQL0969N, SQL1188N or SQL0408N ERROR CODE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
If a table has a column named CURRENT_TIME which is of type TIME, then ADMIN_MOVE_TABLE procedure passes without any error but the value of "CURRENT TIME" special register is inserted into the target table instead of the correct value from the source table. This problem results in data loss and incorrect results being stored in the target table. The ADMIN_MOVE_TABLE procedure returns SQL0408N, SQL0969N or SQL1188N error message when the source table has a column named CURRENT_TIME but its type is not defined as TIME. For example: $ db2 "create table tab_with_time (current_time int not null)" DB20000I The SQL command completed successfully. $ db2 "call admin_move_table ('WEIREN', 'TAB_WITH_TIME', 'IBMDB2SAMPLEREL', 'IBMDB2SAMPLEREL', 'IBMDB2SAMPLEREL', '','', '', '', '', 'MOVE')" SQL0408N A value is not compatible with the data type of its assignment target. Target name is "CURRENT_TIME". SQLSTATE=42821 ADMIN_MOVE_TABLE procedure may also return SQL0969N or SQL1188N error messages instead: SQL0969N There is no message text corresponding to SQL error "-99999" in the message file on this workstation. The error was returned from module "SQL09073" with original tokens "". SQL1188N Column "9" of the SELECT or VALUES statement is not compatible with table column "9". The source column has sqltype "388", and the target column has sqltype "384". In the above example of SQL1188N message, SQL data type (SQLTYPE) 388 is TIME and SQLTYPE 384 is DATE. This shows that the original type of CURRENT_TIME column is defined as DATE. More information on the SQL data types mentioned in SQL error messages can be found in the DB2 for Linux, UNIX, and Windows Information Center. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of ADMIN_MOVE_TABLE * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 V9.7 Fix pack 5 * **************************************************************** | |
Local Fix: | |
Switch the table to offline mode and temporarily rename the column CURRENT_TIME to a different name. Then call the ADMIN_MOVE_TABLE procedure, and finally change the column name back to CURRENT_TIME. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 V9.7 Fix Pack 5 | |
Workaround | |
See LOCAL FIX | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC78387 IC83437 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.08.2011 01.11.2011 01.11.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.5 |