DB2 - Problembeschreibung
Problem IC80589 | Status: Geschlossen |
CLPPLUS RETURNED JAVA.IO.CHARCONVERSIONEXCEPTION, IF DATABASE CODE PAGE IS NOT SAME AS LANG ENVIRONMENT VARIABLE. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - 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.5 fixpack 10. * **************************************************************** | |
Local-Fix: | |
Lösung | |
Problem was first fixed in DB2 UDB Version 9.5 Fix Pack 10. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 25.12.2011 20.10.2012 20.10.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP10 | |
Problem behoben lt. FixList in der Version | |
9.5.0.10 |