问题描述
使用Workbench连接DB2数据库,执行SQL:https://www.cndba.cn/hbhe0316/article/103894
https://www.cndba.cn/hbhe0316/article/103894
https://www.cndba.cn/hbhe0316/article/103894
select MESSAGE
from test.t1 for read only;
问题现象https://www.cndba.cn/hbhe0316/article/103894https://www.cndba.cn/hbhe0316/article/103894
An error occurred when executing the SQL command:
select MESSAGE
from SIVIEW.RMBATCHJOB for read only
[jcc][t4][1065][12306][3.72.54] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null [DB Errorcode=-4220]
1 statement failed.
Execution time: 0.08s
分析过程
查看IBM knowledge centor,初步判断为表中的column字符格式导致:https://www.ibm.com/support/pages/node/269463?mhsrc=ibmsearch_a&mhq=ERRORCODE%3D-4220https://www.cndba.cn/hbhe0316/article/103894
解决方案https://www.cndba.cn/hbhe0316/article/103894
https://www.cndba.cn/hbhe0316/article/103894
https://www.cndba.cn/hbhe0316/article/103894
https://www.cndba.cn/hbhe0316/article/103894
- user需要尝试修改workbench工具,添加对应的字符,以符合该场景。
- 使用其他的client端工具诸如DBeaver可解决该问题。
版权声明:本文为博主原创文章,未经博主允许不得转载。
DB2