DB2 - Problem description
Problem IC77686 | Status: Closed |
CLPPLUS RETURNED JAVA.IO.CHARCONVERSIONEXCEPTION, IF DATABASE CODE PAGE IS NOT SAME AS LANG ENVIRONMENT VARIABLE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
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. | |
Problem Summary: | |
**************************************************************** * 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: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 9.7 Fix Pack 5. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC80588 IC80589 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.07.2011 25.12.2011 25.12.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.5 |