DB2 - Problem description
Problem IC92574 | 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 / 970 - 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: * * users who use ADMIN_MOVE_TABLE procedure * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 V9.7FP9 * **************************************************************** | |
Local Fix: | |
To create an index before the move. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC97955 IC97983 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.05.2013 26.11.2013 26.11.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.9 | |
9.7.0.9 |