DB2 - Problembeschreibung
Problem IC82607 | Status: Geschlossen |
DB2BATCH MAY THROW "CLI0002W DATA TRUNCATED" WHILE FETCHING VARC HAR/CHAR COLUMNS FROM DIFFERENT CODEPAGE DATABASE THAN CLIENT | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
If there is a multi-byte code string in CHAR or VARCHAR data type column, the db2batch command on the unicode codeset client returns "CLI0002W Data truncated" message in CLI layer and the output string is truncated during fetching the column data like below when the database codeset is different from the client. Sample SQL : SELECT COL_CHAR FROM T1 WHERE COL_CHAR IS NOT NULL; CLI message : "(-99999): [IBM][CLI Driver] CLI0002W Data truncated" And cli trace shows less cbValueMax value in SQLBindCol() like cbValueMax=11 than pcbValue in SQLFetch() like pcbValue=15 is defined by db2batch command. ... SQLDescribeCol( pszColName="COL_VARCHAR", psColNameCharLen=11, psSQLType=SQL_VARCHAR, pcbColDef=10, psScale=0, psNullable=SQL_NULLABLE ) ... <--- SQL_SUCCESS Time elapsed - +5.844600E-002 seconds ... SQLBindCol( hStmt=1:1, iCol=1, fCType=SQL_C_CHAR, rgbValue=&02d72968, cbValueMax=11, pcbValue=&02d311b8 ) ... ---> Time elapsed - +3.484000E-003 seconds ... SQLBindCol( ) ... <--- SQL_SUCCESS Time elapsed - +3.025800E-002 seconds ... SQLFetch( hStmt=1:1 ) ... ---> Time elapsed - +3.644000E-003 seconds ... ( iRow=1, iCol=1, fCType=SQL_C_CHAR, rgbValue="<EF><BC><91><EF><BC><92><EF><BC><93> " - x'EFBC91EFBC92EFBC932000', pcbValue=15 ) ... SQLFetch( ) ... <--- SQL_SUCCESS_WITH_INFO Time elapsed - +3.775900E-002 seconds ... SQLFetch( hStmt=1:1 ) ... ---> Time elapsed - +5.124000E-003 seconds ... ( Unretrieved error message="[IBM][CLI Driver] CLI0002W <E3><83><87><E3><83><BC><E3><82><BF><E3><81><8C><E5><88><87><E3> <82><8A><E6><8D><A8><E3><81><A6><E3><82><89><E3><82><8C><E3><81> <BE><E3><81><97><E3><81><9F><E3><80><82> SQLSTATE=01004" ) | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * db2batch user on connecting to the different codepage * * database * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to db2 Version 9.7 FixPak 7 * **************************************************************** | |
Local-Fix: | |
Use the same codeset on the client as the database codeset. ex, export DB2CODEPAGE=< database codepage > and recycle the application | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 9.7 FixPak 7 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC88620 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 11.04.2012 20.10.2012 20.10.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7. | |
Problem behoben lt. FixList in der Version | |
9.7.0.7 |