DB2 - Problem description
Problem IC72043 | Status: Closed |
Db2look dependency on locale settings might introduce wrong values on mimic information | |
product: | |
DB2 FOR LUW / DB2FORLUW / 910 - DB2 | |
Problem description: | |
Given the following table: CREATE TABLE "TEST"."TAB1" ( "FIELDTYPE" CHAR(1) FOR BIT DATA ) db2 " select hex(HIGH2KEY) from sysstat.columns WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA = 'TEST' " 27E827 The db2look output of db2look -d tlook -m -l -a -e -z TEST -t TAB1 -o tlook.out Depending on the locale settings, can show in the mimic information: UPDATE SYSSTAT.COLUMNS SET COLCARD=36, NUMNULLS=0, SUB_COUNT=-1, SUB_DELIM_LENGTH=-1, AVGCOLLENCHAR=-1, HIGH2KEY=X'1A', <<< This is incorrect and we are introducing incorrect values if we replay this ddl LOW2KEY=X'14', AVGCOLLEN=2 WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA = 'TEST'; or UPDATE SYSSTAT.COLUMNS SET COLCARD=36, NUMNULLS=0, SUB_COUNT=-1, SUB_DELIM_LENGTH=-1, AVGCOLLENCHAR=-1, HIGH2KEY='', In here we have the character representation of 0xE28 which is a e with a tilde <<< this is incorrect and if we replay this ddl it will actually fail LOW2KEY=X'14', AVGCOLLEN=2 WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA = 'TEST'; Depending on the locale settings The correct value should be: UPDATE SYSSTAT.COLUMNS SET COLCARD=36, NUMNULLS=0, SUB_COUNT=-1, SUB_DELIM_LENGTH=-1, AVGCOLLENCHAR=-1, HIGH2KEY=X'E8', LOW2KEY=X'14', AVGCOLLEN=2 WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA = 'TEST ' | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * The fix will review the use of isalnum calls by db2look * * code, as * * these calls are locale dependent (on LC_CTYPE). * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.1 and Fix Pack 10 * **************************************************************** | |
Local Fix: | |
Check settings of LC_CTYPE as db2look is using isalnum calls. | |
Solution | |
Problem was first fixed in DB2 Version 9.1 and Fix Pack 10 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 20.10.2010 10.06.2011 10.06.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.1. | |
Problem solved according to the fixlist(s) of the following version(s) |