DB2 - Problem description
Problem IC78387 | Status: Closed |
ADMIN_MOVE_TABLE PROCEDURE RETURNS SQL0969N / SQL1188N / SQL0408N ERROR CODE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 910 - DB2 | |
Problem description: | |
If table has a column of name CURRENT_TIME of type TIME, then admin_move_table will pass without an error and The value of "CURRENT TIME" special register would have been inserted instead of the correct value, causing data loss / incorrect result. DB2 LUW ADMIN_MOVE_TABLE procedure returns SQL0408N / SQL0969N / SQL1188N when source table has a column named as CURRENT_TIME and 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 return SQL0969N or SQL1188N 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". The SQLTYPE can be looked up in InfoCenter, see Related information. In example of SQL1188N above, SQLTYPE 388 is TIME and SQLTYPE 384 is DATE. This shows type of original CURRENT_TIME column is defined as DATE. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * ADMIN_MOVE_TABLE PROCEDURE RETURNS SQL0969N / SQL1188N / * * SQL0408N ERROR CODE. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 LUW Version 9.7 Fix Pack 5 * **************************************************************** | |
Local Fix: | |
Move table in offline mode: you can temporarily rename column CURRENT_TIME to something else, call ADMIN_MOVE_TABLE procedure, and finally rename changed column back to original CURRENT_TIME. | |
available fix packs: | |
DB2 Version 9.1 Fix Pack 11 for Linux, UNIX and Windows | |
Solution | |
Problem was first fixed in Version 9.7 Fix Pack 5 | |
Workaround | |
See LOCAL fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 30.08.2011 16.12.2011 16.12.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.1.0.11 |