home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

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
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 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 FixList