Db2 for z/OS & Db2ZAI

 View Only
Expand all | Collapse all

DB2 ODBC client driver problem with locale after upgrade

  • 1.  DB2 ODBC client driver problem with locale after upgrade

    Posted Mon July 31, 2023 12:31 PM

    Hi, i got 2 servers one with Windows Server 2008 R2 and DB2 ODBC client version v7.1.0 , and other one with Windows Server 2019 and DB2 ODBC client v10.5.11, on both servers we have a visual studio project that uses SSIS to query from our "DB2 for z/OS v11" server.

    The data that stored in database is actually in Persian language and uses 1256 encoding but stored as ASCII in the database.

    we use this sample query in our SSIS project to retrieve data from database:
    SELECT CAST(clientAddress as VARCHAR(100) CCSID 1252) as clientAddress from testTable with UR;

    Everything is fine in Windows Server 2008 R2 and data in Preview Query Results in ADO.NET Source Editor in SSIS shows results in Persian language, but in Windows Server 2019 it tries to show the output as 1252 encoding.


    Any idea how can i enforce DB2 ODBC client to show data with 1256 encoding?

    On both servers locale is set to Persian, and DB2CODEPAGE equals to 1252, also we use a System DSN with IBM DB2 ODBC driver to connect to the remote database.#



    ------------------------------
    yooness rostamy
    ------------------------------


  • 2.  RE: DB2 ODBC client driver problem with locale after upgrade

    Posted Sat August 05, 2023 12:58 AM
    Edited by yooness rostamy Wed August 23, 2023 12:35 AM

    Hi again, I have copied all DB2 ODBC client installed files and registry keys from windows server 2008 to windows server 2019, but at first it didnt work and it was throwing this error: "SQL10007N Message "-1390" could not be retrieved...". So I changed the OS locale to Arabic and it started to work, and the problem with queries with Persian encoding was solved, but that's DB2 version 7.1 and its quite old and unstable , is there anyway to make this work with DB2 ODBC client version 10.5.11?



    ------------------------------
    yooness rostamy
    ------------------------------