Db2 Connect Licensing
Db2 Connect license is required if you are trying to connect to Db2 for z/OS and Db2 for i using Db2 Connect drivers from your applications running in distributed environments (Example: Windows). To purchase a license or to get a trial license, go to the below link and click on “Book a Consultation”
https://www.ibm.com/products/db2-connect/pricing
There are two types of licensing at high level. User can choose either one of these licensing models depending upon their need.
1. 1. Db2 Server Side Db2 Connect License (Unlimited Edition for System z or Unlimited Edition for System i).
This license needs to be activated at the Db2 for z/OS or Db2 for i Server side from your distributed machine (Example: Windows). Once activated, any application (java or non-java) from any machine can connect to the activated Db2 Server. This is a permanent license. There is no trial license available for this type of license.
How to activate this license:
Once you have purchased the license from IBM, download the license activation kit in your distributed machine (eg: Windows) from the below PPA (Passport Advantage) link.
https://www.ibm.com/software/passportadvantage/pao_customer.html
To download the activation kit, you need the part number of the Db2 Connect license edition(Example: Unlimited Edition for System z) you have purchased. To know your part number, get it from the below links.
https://www.ibm.com/support/pages/downloading-ibm-db2-version-115-linux-unix-and-windows
https://www.ibm.com/support/pages/db2-version-111-activation-key-part-numbers
Once downloaded, unzip the package and run the “db2connectactivate” command. Exact syntax of db2connectactivate command is available in the below link.
https://www.ibm.com/docs/en/db2/11.5?topic=edition-db2connectactivate-server-license-activation-utility
Example:
Windows
db2connectactivate.bat -host xyz.ibm.com -port 3750 -database RS22DC1A -user sysadm -password adminpassword
Non-Windows
db2connectactivate.sh -host xyz.ibm.com -port 3750 -database RS22DC1A -user sysadm -password adminpassword
xyz.ibm.com need to be replaced with Db2 Server ip address or hostname or subsystem name, RS22DC1A need to substituted
with your database name, 3750 need to be replaced with Db2 Server DRDA port, sysadm with the database user id and
adminpassword with database password of sysadm user
Note:
If you have activated 11.5 Db2 Connect license in the Db2 Server, then 11.5 and lower version of drivers upto 9.7fp3 can connect
to that Db2 Server. If you have activated 11.1 Db2 Connect license in the Db2 Server then 11.1 and lower version of drivers upto
9.7fp3 can connect to that Db2 Server.
2. Application/Client side Db2 Connect license
This license needs to be activated at the application side where the drivers are getting used. Once activated, only that application
or that machine can connect to the Db2 Server.
There are 2 types of application/client side licenses.
-
- Trial License
Once activated, you can connect to the Db2 Server for the next 90 days. Trial license is not available for download directly from a link without consulting IBM. You may get the trial license directly from the IBM Sales Team or Db2 Connect Product Manager, may not be from PPA link after you have consulted IBM(https://www.ibm.com/products/db2-connect/pricing)
2. Permanent License
Once activated, you can use it till lifetime. This license needs to be downloaded from PPA link after the purchase. There are 3 types of application/client side permanent license.
-
-
- Enterprise Edition
This license is for a user who want to connect to Db2 for z/OS or Db2 for i from any application (Example: MS Excel, Cognos)
- Application Server Edition
This license needs to be purchased if you are using an application server. Ideal for web environments
- Application Server Advanced Edition
This license needs to be purchased if you are using an application server. Ideal for web environments. This is same as Application Server edition, but it has additional capabilities like pureQuery Runtime technology.
There is separate application/client side license files for non-java applications (Example: db2consv_ee.lic) and java applications (Example: db2jcc_license_cisuz.jar).
How to activate non-java application/client side license (trial or permanent):
After downloading the license from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), copy the non-java client side license(Eg: db2consv_ee.lic) to the license folder of the installation(Example: C:\Program Files\IBM\IBM DATA SERVER DRIVER\license\). If you are using instance less client packages like IBM Data Server Driver or IBM Data Server Driver for ODBC and CLI then this is enough. But if you are using instance based client packages like IBM Data Server Client or IBM Data Server Runtime Client you need to run the below additional command to register the license with the license manager.
Example:
db2clicm -a C:\Program Files\IBM\IBM DATA SERVER DRIVER\license\db2consv_ee.lic
where C:\Program Files\IBM\IBM DATA SERVER DRIVER\license\db2consv_ee.lic is the path where you have kept the application/client side Db2 Connect license file.
Note:
If you are using 11.5 Db2 Connect driver then you will need 11.5 Db2 Connect license to connect to the Db2 Server. You will not be able to use 11.1 or lower version Db2 Connect license with a 11.5 Db2 Connect driver.
In few environments, you may get license error even if you follow the above instructions. This is probably because there is no write permission for the driver in the Common App Data Path location (Eg: C:\ProgramData\IBM\DB2). In such cases, set the environment variable DB2_COMMON_APP_DATA_PATH to point to a different location where you have write permission
How to activate java application/client side license (trial or permanent):
After downloading the license from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), copy the java client side license(Eg: db2jcc_license_cisuz.jar) to your machine where the application is residing. Add the path of the license jar (Example: C:\Users\smathai\Downloads\db2jcc_license_cisuz.jar) to the CLASSPATH environment variable.
After activating the license (Db2 Server Side Db2 Connect Unlimited license or Application/client side Db2 Connect license), you can try connection from any application or db2cli (CLI/ODBC) or testconn (.NET) utilities. Syntax for the db2cli command below
db2cli validate -database RS22DC1A:xyz.IBM.com:3750 -connect -user newton -passwd pass123
RS22DC1A need to substituted with your database name, xyz.ibm.com need to replaced with Db2 Server ip address or hostname or subsystem name, 3750 need to be replaced with Db2 Server DRDA port, newton with the database user id and pass123 with database password of the user newton.
Syntax for the testconn command below
testconn40 database=RS22DC1A;server=xyz.ibm.com:3750;userid=newton;password=pass123
testconn20 database=RS22DC1A;server=xyz.ibm.com:3750;userid=newton;password=pass123
You can verify the java connection using the below command.
java com.ibm.db2.jcc.DB2Jcc -url jdbc:db2://xyz.ibm.com:3750/RS22DC1A -user newton -password pass123
Where to download Db2 Connect drivers:
Various Db2 Connect Driver Packages can be downloaded from the below link. IBM Data Server Driver Package (DSDriver) is the recommended package to be downloaded.
https://www.ibm.com/support/pages/download-fix-packs-version-ibm-data-server-client-packages
Open Source drivers are not available in the above client packages from Db2 Connect 11.5 version. Follow the instructions in the github link below to download Open Source drivers
https://github.com/ibmdb/node-ibm_db
https://github.com/ibmdb/python-ibmdb
https://github.com/ibmdb/go_ibm_db
https://github.com/ibmdb/python-ibmdb-django
https://github.com/ibmdb/python-ibmdbsa
https://github.com/ibmdb/ruby-ibmdb
https://github.com/php/pecl-database-ibm_db2
https://github.com/php/pecl-database-pdo_ibm
.NET7, .NET6, .NET5, .NET Core drivers can be downloaded from nuget
.NET 7/.NET 6 Driver
https://www.nuget.org/packages/Net.IBM.Data.Db2
.NET 5 Driver
https://www.nuget.org/packages/Net5.IBM.Data.Db2
.NET Core Drivers
https://www.nuget.org/packages/IBM.Data.DB2.Core
EF Core can be downloaded from the below nuget link
https://www.nuget.org/packages/IBM.EntityFrameworkCore
“Db2 Connect” Extension for VS Code can be installed from the VS Code editor. You will need the non-java Application/Client side license (Example: db2consv_ee.lic) or Db2 Server Side Unlimited license mentioned above to Connect to Db2 for z/OS or Db2 for i from your Db2 Connect VS Code extension.
#Db2 #Db2Z #db2z/os #DataServerDrivers #Db2Connect #db2#db2
#data-highlights-home