Fully managed cloud. 30-day FREE full featured trial. Start Now
cancel
Showing results for 
Search instead for 
Did you mean: 

Import IBM DB2 LUW - JDBC driver

torsten
SQL-Fighter

 

Hello,
 
When executing JDBC import of DB2 LUW data we receive a java.io.CharConversionException, as described by IBM (IBM error).
When trying to install a newer version of the driver or setting the corresponding System Property to ignore the error - we fail. Exasol seems to not accept newer drivers - we only get timeouts when executing the IMPORT command. I am not aware howto set System Property on the import command / JDBC installation / or Driver url. 
It could obvioiusly be that the source data does have wrong UTF-8 characters stored, but unfortunately the error message does not even provide a column. Does anybody perhaps have an SQL script to check on those columns whether there are non-utf-8 characters included?
 
Does anybody know this issue and could help?
 
Thanks in advance, Torsten
 
CEO at Alligator Company, providing Datavault automation and DataOps on Exasol with Datavault Builder and DBTVault
1 ACCEPTED SOLUTION

Accepted Solutions

Charlie
Xpert

Hi @torsten,

we had the same issue with new DB2 JDBC driver versions in the past. Sometimes driver versions try to write files into the /tmp directory and thus are blocked by Exasol.

You could try to set "disable security manager" in EXAOperation for the driver:

Charlie_0-1642578272433.png

If it works after setting this property Exasol will have to whitelist the operation the driver is trying to do.

 

Regarding the codepage issue with the invalid characters:

  • I assume the codepage of the db2 luw database is 1208 (utf-8)?
  • Try to export the table to del (db2 export -> be sure that your clp connection has codepage=1208) 
grep -axv '.*' FILE

This should highlight non-unicode characters if your linux locale is set to utf-8.

Regards

 

 

View solution in original post

4 REPLIES 4

Charlie
Xpert

Hi @torsten,

we had the same issue with new DB2 JDBC driver versions in the past. Sometimes driver versions try to write files into the /tmp directory and thus are blocked by Exasol.

You could try to set "disable security manager" in EXAOperation for the driver:

Charlie_0-1642578272433.png

If it works after setting this property Exasol will have to whitelist the operation the driver is trying to do.

 

Regarding the codepage issue with the invalid characters:

  • I assume the codepage of the db2 luw database is 1208 (utf-8)?
  • Try to export the table to del (db2 export -> be sure that your clp connection has codepage=1208) 
grep -axv '.*' FILE

This should highlight non-unicode characters if your linux locale is set to utf-8.

Regards

 

 

torsten
SQL-Fighter

Yes - the database is has a codepage of utf-8 - but I was hoping to get a solution in SQL - because we do not have os-level or db2 client level access to do export. Also the export is huge - was hoping to be able to filter on only false entry rows.

CEO at Alligator Company, providing Datavault automation and DataOps on Exasol with Datavault Builder and DBTVault

torsten
SQL-Fighter

@Charlie sorry, but unfortunately only using a new jdbc jar was not the solution - although with security manager disabled the jdbc imports work generally, with our problematic import we still get the unsupported character conversion. 

This means unfortunately that we need to configure the driver with system properties - as described in the IBM note. 

"Set the driver configuration property db2.jcc.charsetDecoderEncoder=3"

Unfortunately there is no option in the Exasol management console to set this property. Does anybody know how to achieve this within Exasol?

CEO at Alligator Company, providing Datavault automation and DataOps on Exasol with Datavault Builder and DBTVault

torsten
SQL-Fighter

Since I could not find a way to set driver properties in community or documentation, I added the following ticket: 

  1. EXA-38630

Perhaps there will be a solution provided there.

CEO at Alligator Company, providing Datavault automation and DataOps on Exasol with Datavault Builder and DBTVault