Closed jishnuraghu closed 1 year ago
@devuser-2048 The reason is your C# code or Java code is using different driver for which client license is already installed or your C# or Java application is connecting to a different server. You need to pickup the license file used by your C# code and copy under C:\Users\maxmenu\Development\workspaces\agent-view\poc\ibm-db2-poc\node_modules\ibm_db\installer\clidriver\license
directory, then it would work for ibm_db too.
More info about db2connect license:
clidriver\license
directory to work.
Thanks.Thanks for the update @bimalkjha. I'm still getting the error on the license even after adding the db2consv_zs.lic
to the location provided. Please find the file below. This is the correct location right? Is there some way to validate the license file contents?
Below is some of the extract from the .lic
file
@devuser-2048 You can verify the applied license file by using -displaylic
option with validate
command. You can verify the TCPIP connectivity and check the license info using below command:
db2cli validate -database "dbname:myhost.rocketsoftware.com:446" -user dbuser -passwd dbpass -connect -displaylic
The extract from your .lic
file shows the ProductVersion=10.5 i.e. this license file is for a db2 v10.5 driver. The clidriver downloaded at C:\Users\maxmenu\Development\workspaces\test\poc\ibm-db2-poc\node_modules\ibm_db\installer\clidriver is of version 11.5.6.0 which needs a Db2 V11.5 license file. That is why you are still getting SQL1598N error.
You can proceed using either of below method:
IBM_DB_HOME=<full_path_of_db2_v10.5_install_dir>
and then run npm install ibm_db
. If IBM_DB_HOME
is set, then ibm_db will not download the v11.5.6 clidriver but uses the pointed one.Thanks.
It's working fine now after installing the drivers and setting the IBM_DB_HOME path. Thank you very much for the help.
Just one more follow up question. If we have to get this run on AWS lambda, then we will require the drivers for the Linux operating system. For v10.5, is it available for download? Could you point to that please? I couldn't find a 10.5 driver here
@devuser-2048 Yes v10.5 driver is available for download. You can download it form here: https://www.ibm.com/support/fixcentral/swg/selectFixes?source=dbluesearch&product=ibm%2FInformation+Management%2FIBM+Data+Server+Client+Packages&release=10.5.*&platform=Linux+64-bit,x86_64&searchtype=fix&fixids=*dsdriver*FP011&function=fixId&parent=ibm/Information%20Management
After download on AWS lambda, you need to untar it, you'll get dsdriver directory. Then cd to dsdriver and run installDSDriver
script to install it. Then you can set the IBM_DB_HOME to dsdriver directory.
V10.5 driver is out of support, so you do not find it under odbc_cli directory on the link that you shared. Thanks.
Thank you very much 👍
Hi Team,
I understand that this issue is being reported and discussed multiple times in this forum and I had alerady went through it. I'm getting the error
SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968
while trying to connect to DB2 database. Details from thedb2cli
is available below.Question is, the license is not required when we connect from the C# code or Java code using the JDBC drivers. Why is this error coming when we connect from using the node package?