DB2 - Problembeschreibung
Problem IC77686 | Status: Geschlossen |
CLPPLUS RETURNED JAVA.IO.CHARCONVERSIONEXCEPTION, IF DATABASE CODE PAGE IS NOT SAME AS LANG ENVIRONMENT VARIABLE. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
clpplus may return a java.io.CharConversionException, if the database code page is not same as the code page implied by the setting of the LANG environment variable at the time that DB2 is started. In the following example, the database is created with code page 1208; however, the DB2 server locale of Ja_JP implies a Shift JIS code page, not Unicode. DB2 formats the value of SQLERRM using Shift JIS, resulting in a code page conversion error. export LANG=Ja_JP db2set DB2_COMPATIBILITY_VECTOR=ORA db2set DB2COMM=TCPIP db2 update dbm cfg using svcename db2test db2start db2 create db testdb using codeset UTF-8 territory JP Execute the following pl/sql. create table TEST ( id NUMBER, name VARCHAR2(10)); set serveroutput on; DECLARE v_rec test%ROWTYPE; BEGIN select * into v_rec from test where id = 100; EXCEPTION WHEN Others THEN DBMS_OUTPUT.PUT_LINE('SQLERRM:'||SQLERRM); END; / drop table TEST; quit; clpplus -nw userid/password@HOSTNAME:PORTNUMBER/DATABASE @test.sql You will see a DB250505E error. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * clpplus may return a java.io.CharConversionException, if * * the database code page is not same as the code page * * implied by the setting of the LANG environment variable * * at the time that DB2 is started. * * * * In the following example, the database is created with * * code page 1208; however, the DB2 server locale of * * Ja_JP implies a Shift JIS code page, not Unicode. DB2 * * formats the value of SQLERRM using Shift JIS, resulting * * in a code page conversion error. * * * * export LANG=Ja_JP * * db2set DB2_COMPATIBILITY_VECTOR=ORA * * db2set DB2COMM=TCPIP * * db2 update dbm cfg using svcename db2test * * db2start * * db2 create db testdb using codeset UTF-8 territory JP * * * * Execute the following pl/sql. * * * * create table TEST ( id NUMBER, name VARCHAR2(10)); * * set serveroutput on; * * DECLARE * * v_rec test%ROWTYPE; * * BEGIN * * select * into v_rec from test where id = 100; * * EXCEPTION * * WHEN Others THEN * * DBMS_OUTPUT.PUT_LINE('SQLERRM:'||SQLERRM); * * END; * * / * * drop table TEST; * * quit; * * * * clpplus -nw userid/password@HOSTNAME:PORTNUMBER/DATABASE * * @test.sql * * * * You will see a DB250505E error. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 UDB version 9.7 fixpack 5. * **************************************************************** | |
Local-Fix: | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in DB2 UDB Version 9.7 Fix Pack 5. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC80588 IC80589 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 24.07.2011 25.12.2011 25.12.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP5 | |
Problem behoben lt. FixList in der Version | |
9.7.0.5 |