DB2 - Problem description
Problem IC97955 | Status: Closed |
ADMIN_MOVE_TABLE FAILED WITH SQL0104N IF THE SOURCE TABLE HAS NO INDEX AND THE 1ST COLUMN SIZE EXCEEDS THE MAX KEY LENGTH LIMIT | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
If the source table has no index and the first column size exceeds the max key size limit, then AMT would fail with SQL0104N. For example, the table below has DESCRIPTION column with VARCHAR(4000) which exceeds the max key length limit (2048 bytes for the table space with 8K page size) as the 1st column, and there is no index defined on the table: CREATE TABLE "WCS "."PARTROLEDS" ( "DESCRIPTION" VARCHAR(4000) , "PARTROLE_ID" INTEGER NOT NULL , "LANGUAGE_ID" INTEGER NOT NULL , "OPTCOUNTER" SMALLINT ) IN "TAB8K" ; $ db2 "select substr(colname,1,30), colno FROM SYSCAT.COLUMNS WHERE tabname='PARTROLEDS' order by colno" 1 COLNO ------------------------------ ------ DESCRIPTION 0 PARTROLE_ID 1 LANGUAGE_ID 2 OPTCOUNTER 3 4 record(s) selected. $ db2 "call sysproc.admin_move_table( 'WCS', 'PARTROLEDS', 'TBS16', 'TBS16_I', 'TBS16_L', '', '', '', '', '', 'MOVE,TRACE' )" SQL0104N An unexpected token "," was found following ""WCS"."PARTROLEDS"(". Expected tokens may include: "<space>". SQLSTATE=42601 And the ADMIN_MOVE_TABLE trace like: . . (10600)EXIT: adminotm_Otm_getColumns | 0 | 4 . . (3116)ENTRY: adminotm_Otm_generateIdent | 0x2aaac1be7fc0 | 129 | PARTROLEDS | g | 128 . . (3141)EXIT: adminotm_Otm_generateIdent | 0 | PARTROLEDSAJd0#jg . . (2292)ENTRY: adminotm_StoredProcedure_execDirect | CREATE INDEX "WCS"."PARTROLEDSAJd0#jg" ON "WCS"."PARTROLEDS"(,"PARTROLE_ID","LANGUAGE_ID","OPTCOUNTER") | 0x2aabcea07d70 . . . (711)ENTRY: adminotm_fillSqlca | 3 | 65542 | 0x2aabcea07d70 . . . . (728)DATA: adminotm_fillSqlca | 1 | SQL0104N An unexpected token "," was found following ""WCS"."PARTROLEDS"(". Expected tokens may include: "<space>". SQLSTATE=42601 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * all users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 10.5 Fix Pack 4. * **************************************************************** | |
Local Fix: | |
To create an index before the move. | |
available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
Solution | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 26.11.2013 10.09.2014 10.09.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.4 |