DB2 - Problem description
Problem IC78225 | Status: Closed |
ADMIN_MOVE_TABLE PROCEDURE RETURNS SQL0413N WHEN SOURCE TABLE HAS A DECIMAL IDENTITY COLUMN WITH SOME BIG VALUES. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
ADMIN_MOVE_TABLE procedure returns SQL0413N when the source table has decimal identity column, and its values, e.g. START WITH and MAXVALUE etc, exceeds the largest value of BIGINT in DB2. During the process of ADMIN_MOVE_TABLE(), an internal query casts those values into BIGINT. If any of values greater than +9,223,372,036,854,775,807, it returns SQL0413N. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 LUW Version 9.7 Fix Pack 6 * **************************************************************** | |
Local Fix: | |
Move table offline. rename table tab_name to tab_name_temp; alter table tab_name_temp alter identity_column DROP IDENTITY; call sysproc.admin_move_table('schema', 'tab_name_temp'......'MOVE'); alter table tab_name_temp alter identity_column set GENERATED ALWAYS AS IDENTITY ( START WITH +1 INCREMENT BY +1 MINVALUE +1 MAXVALUE +9999999999999999999999999999 NO CYCLE CACHE 20 NO ORDER ) ; select max(identity_column) from tab_name_temp ; -- found max identity value plus 1 as restart_value alter table tab_name_temp ALTER identity_column RESTART WITH +restart_value ; rename table tab_name_temp to tab_name; ; | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in Version 9.7 Fix Pack 6 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 19.08.2011 13.06.2012 13.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |