<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Troubleshooting  DB2z connection problems. in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Troubleshooting-DB2z-connection-problems/ta-p/1729963</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;SPAN&gt;Replicate is unable to connect to the DB2 database on z/OS. Testing the DB2z Endpoint is failing with an error similar to the followings&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SYS-E-HTTPFAIL, Cannot connect to DB2 zOS Server.
SYS,GENERAL_EXCEPTION,Cannot connect to DB2 zOS Server,RetCode: SQL_ERROR SqlState: 08001 NativeError: -30081 Message: [IBM][CLI Driver] SQL30081N ...&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;Testing DB2z connection on Windows:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;Locate the IBM\SQLLIB\BIN folder, this should contain the db2cli.exe utility.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;By default the installation directory is:&lt;BR /&gt;&lt;SPAN&gt;C:\Program Files\IBM\SQLLIB\BIN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;Issue the following command replacing the parameters with the actual values:&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; db2cli validate -database &amp;lt;location&amp;gt;:&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt; -connect -user &amp;lt;username&amp;gt; -passwd &amp;lt;pwd&amp;gt; -displaylic​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;A machine with the IBM Data Server Driver ODBC/CLI
Location of the client is C:\Clients\DB2zODBC
&amp;gt; cd C:\Clients\DB2zODBC\bin
&amp;gt; db2cli validate -database myloc:myzos:5035 -connect -user user1 -passwd pwd1 -displaylic

Sample output:

Client Package Type       : IBM Data Server Driver For ODBC and CLI
Client Version (level/bit): DB2 v11.1.0.1527 (s1606081100/64-bit)
Client Platform           : NT 64BIT
Install/Instance Path     : C:\Clients\DB2zODBC

Common App Data Path      : C:\ProgramData\IBM\DB2\C_Clients_DB2zODBC
DB2DSDRIVER_CFG_PATH value: &amp;lt;not-set&amp;gt;
db2dsdriver.cfg Path      : &amp;lt;Common App Data Path&amp;gt;\cfg\db2dsdriver.cfg
DB2CLIINIPATH value       : &amp;lt;not-set&amp;gt;
db2cli.ini Path           : &amp;lt;Common App Data Path&amp;gt;\cfg\db2cli.ini
db2diag.log Path          : &amp;lt;Common App Data Path&amp;gt;\db2diag.log

...
===============================================================================
Connection attempt for database "DALLASB:zos5:5035":
===============================================================================
[SUCCESS]
===============================================================================
Valid License Found            : Yes
License location               : Server
Server routine type attempted  : SP
DB2 connect license version    : 1101
===============================================================================
The validation is completed.
===============================================================================&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this validation will also list two important configuration files for the DB2 Client. The location of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;db2cli.ini&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;db2dsdriver.cfg&lt;/STRONG&gt;, these files should be investigated for any parameters that could affect the connection. This is especially important when using a DSN and not a connection string via Replicate.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Simulating an ODBC connection similar to the Replicate's Test Connection. This is accomplished using the native db2cli connection executed from the same location in the db2 driver bin folder.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;First create a text file containing the following query:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; echo select 1 from sysibm.sysdummy1 &amp;gt;&amp;gt;insql.sql​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the db2cli as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; db2cli execsql -connstring "HOSTNAME=myzos;SERVICENAME=5035;DATABASE=myloc;CURSORHOLD=1;DESCRIBEPARAM=1;CLIPatch2=15;CONCURRENTACCESSRESOLUTION=1;PROGRAMNAME=R4ZSCDC174FB;UID=user1;PWD=pw1" -inputsql insql.sql​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IBM DATABASE 2 Interactive CLI Sample Program
(C) COPYRIGHT International Business Machines Corp. 1993,1996
All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
&amp;gt; select 1 from sysibm.sysdummy1
FetchAll:  Columns: 1
  1
  1
FetchAll: 1 rows fetched.
&amp;gt;
 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;Testing the connection using DB2CLI on Linux:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;The steps on Linux are very similar to the Windows, the differences may be:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;In the shell maybe be able to execute db2cli, if not look for the the installation folder.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;At some systems it's possible to find it by checking the value of an environment variable:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ echo $DB2_CLI_DRIVER_INSTALL_PATH
/opt/db2_odbc/clidriver
Create the insql.sql as follows:
$ cd /opt/db2_odbc/clidriver
$ cat select 1 from sysibm.sysdummy1 &amp;gt;insql.sql&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2020 10:04:01 GMT</pubDate>
    <dc:creator>David_Fergen</dc:creator>
    <dc:date>2020-08-28T10:04:01Z</dc:date>
    <item>
      <title>Troubleshooting  DB2z connection problems.</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Troubleshooting-DB2z-connection-problems/ta-p/1729963</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;SPAN&gt;Replicate is unable to connect to the DB2 database on z/OS. Testing the DB2z Endpoint is failing with an error similar to the followings&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SYS-E-HTTPFAIL, Cannot connect to DB2 zOS Server.
SYS,GENERAL_EXCEPTION,Cannot connect to DB2 zOS Server,RetCode: SQL_ERROR SqlState: 08001 NativeError: -30081 Message: [IBM][CLI Driver] SQL30081N ...&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;Testing DB2z connection on Windows:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;Locate the IBM\SQLLIB\BIN folder, this should contain the db2cli.exe utility.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;By default the installation directory is:&lt;BR /&gt;&lt;SPAN&gt;C:\Program Files\IBM\SQLLIB\BIN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;Issue the following command replacing the parameters with the actual values:&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; db2cli validate -database &amp;lt;location&amp;gt;:&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt; -connect -user &amp;lt;username&amp;gt; -passwd &amp;lt;pwd&amp;gt; -displaylic​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;A machine with the IBM Data Server Driver ODBC/CLI
Location of the client is C:\Clients\DB2zODBC
&amp;gt; cd C:\Clients\DB2zODBC\bin
&amp;gt; db2cli validate -database myloc:myzos:5035 -connect -user user1 -passwd pwd1 -displaylic

Sample output:

Client Package Type       : IBM Data Server Driver For ODBC and CLI
Client Version (level/bit): DB2 v11.1.0.1527 (s1606081100/64-bit)
Client Platform           : NT 64BIT
Install/Instance Path     : C:\Clients\DB2zODBC

Common App Data Path      : C:\ProgramData\IBM\DB2\C_Clients_DB2zODBC
DB2DSDRIVER_CFG_PATH value: &amp;lt;not-set&amp;gt;
db2dsdriver.cfg Path      : &amp;lt;Common App Data Path&amp;gt;\cfg\db2dsdriver.cfg
DB2CLIINIPATH value       : &amp;lt;not-set&amp;gt;
db2cli.ini Path           : &amp;lt;Common App Data Path&amp;gt;\cfg\db2cli.ini
db2diag.log Path          : &amp;lt;Common App Data Path&amp;gt;\db2diag.log

...
===============================================================================
Connection attempt for database "DALLASB:zos5:5035":
===============================================================================
[SUCCESS]
===============================================================================
Valid License Found            : Yes
License location               : Server
Server routine type attempted  : SP
DB2 connect license version    : 1101
===============================================================================
The validation is completed.
===============================================================================&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this validation will also list two important configuration files for the DB2 Client. The location of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;db2cli.ini&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;db2dsdriver.cfg&lt;/STRONG&gt;, these files should be investigated for any parameters that could affect the connection. This is especially important when using a DSN and not a connection string via Replicate.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Simulating an ODBC connection similar to the Replicate's Test Connection. This is accomplished using the native db2cli connection executed from the same location in the db2 driver bin folder.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;First create a text file containing the following query:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; echo select 1 from sysibm.sysdummy1 &amp;gt;&amp;gt;insql.sql​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the db2cli as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt; db2cli execsql -connstring "HOSTNAME=myzos;SERVICENAME=5035;DATABASE=myloc;CURSORHOLD=1;DESCRIBEPARAM=1;CLIPatch2=15;CONCURRENTACCESSRESOLUTION=1;PROGRAMNAME=R4ZSCDC174FB;UID=user1;PWD=pw1" -inputsql insql.sql​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IBM DATABASE 2 Interactive CLI Sample Program
(C) COPYRIGHT International Business Machines Corp. 1993,1996
All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
&amp;gt; select 1 from sysibm.sysdummy1
FetchAll:  Columns: 1
  1
  1
FetchAll: 1 rows fetched.
&amp;gt;
 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;Testing the connection using DB2CLI on Linux:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;The steps on Linux are very similar to the Windows, the differences may be:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI&gt;In the shell maybe be able to execute db2cli, if not look for the the installation folder.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;At some systems it's possible to find it by checking the value of an environment variable:&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ echo $DB2_CLI_DRIVER_INSTALL_PATH
/opt/db2_odbc/clidriver
Create the insql.sql as follows:
$ cd /opt/db2_odbc/clidriver
$ cat select 1 from sysibm.sysdummy1 &amp;gt;insql.sql&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 10:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Troubleshooting-DB2z-connection-problems/ta-p/1729963</guid>
      <dc:creator>David_Fergen</dc:creator>
      <dc:date>2020-08-28T10:04:01Z</dc:date>
    </item>
  </channel>
</rss>

