DB2 - Problem description
Problem IC64640 | Status: Closed |
ADMIN_GET_MSGS() FAILS IF DATABASE CODE PAGE DIFFERS TO SERVER CODE PAGE, WHEN CALLED FROM A JAVA PROGRAM. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
If you execute SQL statement in MSG_RETRIEVAL column of admin_cmd result set in a Java program as below when database code page differs to server code page: ------------- con = DriverManager.getConnection("jdbc:db2:sample"); // execute admin command CallableStatement cs = con.prepareCall("call admin_cmd('import from c:\\tmp\\test.txt of del messages on server replace into test')"); cs.execute(); ResultSet rs = cs.getResultSet(); rs.next(); String retSQL = rs.getString("MSG_RETRIEVAL"); System.out.println(retSQL); ------------- It fails with below error: ------------- SELECT SQLCODE, MSG FROM TABLE(SYSPROC.ADMIN_GET_MSGS('4677_DB2 ')) AS MSG SQL3109N: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.57.82] java.i o.CharConversionException caught. See attached Throwable ERRORCODE=-4220, SQLSTATE=null ------------- If there is no code page conversion, database code page is same as server code page, problem does not occur. This is a platform independence problem so this problem can be occured on Linux, Unix and Windows. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DB2 UDB Version 9.5. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error description field for more information. * **************************************************************** * RECOMMENDATION: * * See v9.7 APAR and upgrade V9.7 then apply the associated * * APAR FixPack. * **************************************************************** | |
Local Fix: | |
N/A | |
Solution | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 18.11.2009 03.03.2010 03.03.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.7. | |
Problem solved according to the fixlist(s) of the following version(s) |