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 IT22162 Status: Closed

CONVERSION BETWEEN DIFFERENT CODE PAGES CAN LEAD TO UNEXPECTED TRUNCATION
OF DATA

product:
DB2 FOR LUW / DB2FORLUW / B10 - DB2
Problem description:
When converting from one codepage to another, it is possible for 
the resultant data to need more space than before. Db2 will 
calculate the maximum amount of space needed after the 
conversion and then truncate if the estimation exceeds the page 
size. This is the normal case. 
If the estimated size is larger than 64KB, export unexpectedly 
truncates too much due to an integer overflow. 
 
Here is a sample repro scenario: 
 
# test.del contains 30000 bytes string like "0123456..." 
export LANG=Ja_JP 
db2 terminate 
db2 drop db sample 
db2 create db sample using codeset IBM-943 territory JP 
db2 connect to sample 
db2 create bufferpool BUFF32K size 10 pagesize 32768 
db2 "create large tablespace tbs1 pagesize 32768 managed by 
database using (file 'cont1' 1024) bufferpool BUFF32K" 
db2 CREATE TABLE TEST (COl1 VARCHAR(30000)) long in tbs1 
db2 "import from test.del of del insert into TEST (COl1)" 
db2 terminate 
 
# IBM-943->IBM-943 no code conversion 
 
export LANG=Ja_JP 
db2 connect to sample 
db2 export to export1.del of del select COL1 from test 
db2 terminate 
 
# IBM-943->UTF-8 code conversion 
 
export LANG=JA_JP 
db2 connect to sample 
db2 export to export2.del of del select COL1 from test 
db2 terminate 
 
$ ls -l *.del 
-rw-rw-rw-   1 db2inst1  db2iadm  30003 Aug 13 21:46 export1.del 
-rw-rw-rw-   1 db2inst1  db2iadm  24467 Aug 13 21:46 export2.del 
<<<< 
-rw-rw-rw-   1 db2inst1  db2iadm  30000 Aug 13 21:46 test.del
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Export with code page conversion                             * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to v11.1m3fp3                                        * 
****************************************************************
Local Fix:
Use the same code page when exporting the data.
available fix packs:
Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix002 for Linux, UNIX, and Windows

Solution
No data is truncated if converting from one code page to another 
as long as characters that are converted uses the same byte 
representation
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.08.2017
15.03.2018
15.03.2018
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)