Data Management Global

 View Only

Everything About Db2 Connect Licensing

By Shilu Mathai posted Fri May 05, 2023 03:09 AM

  

                                                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). 

There are 5 licensing models available to buy. You could choose one of these licensing models as per your use case.

Db2 Connect Unlimited Edition for System z

    This license provides unlimited connectivity to Db2 for z/OS from any distributed machine like linux, unix, windows and mac

Db2 Connect Unlimited Edition for System i

    This license provides unlimited connectivity to Db2 for i from any distributed machine like linux, unix, windows and mac   

Db2 Connect Application Server Edition

    This license needs to be purchased if you are using an application server. Ideal for web environments. This license is capable of providing connectivity to Db2 for z/OS or Db2 for i

Db2 Connect Advanced Application Server 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. This license is capable of providing connectivity to Db2 for z/OS or Db2 for i

Db2 Connect 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). In this license model, there are 2 options. 1. authorized user license 2. concurrent user license

To purchase a license, go to the below link and click on “Book a meeting”

https://www.ibm.com/products/db2-connect/pricing

   

Apart from the above licensing models to buy, there is trial license available to try out. Once trial license is activated, applications can connect to the Db2 Server for the next 90 days. This license is capable of providing connectivity to Db2 for z/OS or Db2 for i. 

Trial license is not available for download directly from an IBM link. To get a trial license, contact your IBM Sales or Renewal representative and they will raise the evaluation license request on your behalf. If you do not know your IBM Sales or Renewal representative, you can contact Tiffiney Myers(tmyers@us.ibm.com) and she will engage the right IBM contact to process your evaluation request.

Direct Connectivity without using Db2 Connect Gateway/Server

 This topic discusses the license activation when direct connectivity is attempted from applications using Db2 Connect drivers to Db2 Server without having Db2 Connect Gateway/Server in between. We recommend direct connectivity. If customer is planning for direct connectivity and if they are looking for Db2 Connect enterprise license edition, they can get only authorized user license. There is no option to get concurrent user license while choosing direct connectivity.

 If you are buying any of the first 2 license models mentioned above (Db2 Connect Unlimited Edition for System z or Db2 Connect Unlimited Edition for System i), license need to be activated at the Db2 Server from your distributed machine (Example: Windows). once activated, any application (java or non-java) from any machine can connect to the activated Db2 Server.

How to activate 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 link.

https://www.ibm.com/support/pages/downloading-ibm-db2-version-115-linux-unix-and-windows

For example

M07JNML IBM® DB2 Connect™ Unlimited Edition for System z - Activation V11.5.8 for Linux®, UNIX and Windows®

Here M07JNML is the part number that needed to be used for downloading activation kit for Db2 Connect Unlimited Edition for System z from PPA.

Once downloaded, unzip the package, navigate to the folder where "db2connectactivate.bat" is present and run the “db2connectactivate” command as shown below from a command prompt if you are using windows machine or shell if you are using non-windows machine like linux, mac etc. 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.

The last 3 licensing models (Db2 Connect Application Server Edition or Db2 Connect Advanced Application Server Edition or Db2 Connect Enterprise Edition) and trial license can be activated only 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 separate license files for non-java applications (Example: db2consv_ee.lic) and java applications (Example: db2jcc_license_cisuz.jar) while using the last 3 license models and trial license.

How to activate non-java license

After downloading the license from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), copy the non-java 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 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 license:

After downloading the license from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), copy the java 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.

Note:

Db2 Connect license need to be reactivated only when you migrate from one major version (11.1) of Db2 Connect to another major version (11.5) of Db2 Connect. For example, while migrating from 11.1.4.4 to 11.5.0.0, you need to download the activation kit of 11.5.0.0 and reactivate the license by following the steps outlined earlier. If you are migrating to another mod/fixpack of the same Db2 Connect major version, reactivation is not needed. For example, if you are migrating from 11.5.0.0 to 11.5.4.0 then license reactivation is not needed.

Testing Connectivity

 
After activating the 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

Above connection verification commands need to be run from a command prompt if you are using a windows machine or from a shell if you are using a non-windows machine like linux, mac etc.

Indirect Connectivity through Db2 Connect Gateway/Server

If you are going for indirect connectivity using Db2 Connect Gateway/Server between the applications which uses Db2 Connect drivers and Db2 Server, then the license needs to be activated only at the Db2 Connect Gateway/Server for any of the licensing editions. If you are choosing Db2 Connect enterprise edition, then customer can choose either authorized user license or concurrent user license while going with indirect connectivity.

 Activating license at Db2 Connect Gateway/Server

 After downloading the license from PPA (https://www.ibm.com/software/passportadvantage/pao_customer.html), copy the license (Eg: db2consv_ee.lic) to the  license folder of the installation (Example: C:\Program Files\IBM\SQLLIB\license\). You need to run the below 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 Db2 Connect license file.

Once license is applied, you can start Db2 Connect Gateway/Server by running "db2start" command.


Note:

If you are using 11.5 Db2 Connect Gateway/Server, 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 of Db2 Connect license with a 11.5 Db2 Connect Gateway.

Where to download Db2 Connect drivers:

Various Db2 Connect Driver Packages can be downloaded from PPA or from the below fixcentral 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

  

.NET8, .NET7, .NET6, .NET5, .NET Core drivers can be downloaded from nuget

.NET8 / .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 have to do the non-java license (Example: db2consv_ee.lic) activation in the VS Code or activate the Unlimited license at the Db2 Server to Connect to Db2 for z/OS or Db2 for i from your Db2 Connect VS Code extension.        

Where to download Db2 Connect Gateway/Server

Db2 Connect Gateway/Server can be downloaded from the below link.

https://www.ibm.com/support/pages/download-db2-fix-packs-version-db2-linux-unix-and-windows

Getting started with Db2 Connect drivers.

https://www.ibm.com/support/pages/getting-started-ibm-data-server-drivers

#Db2 #Db2Z #db2z/os #DataServerDrivers #Db2Connect #db2#db2


#data-highlights-home

3 comments
664 views

Permalink

Comments

Mon May 13, 2024 03:32 AM

Hello. Thanks for the very informative post! When activating a license on an infrastructure utilizing direct connectivity without using Db2 Connect Server, will a .swidtag file be created? 

Fri February 16, 2024 07:09 AM

Kindly go to the below link and click on "Book at meeting" for queries regarding license pricing and calculation.

https://www.ibm.com/products/db2-connect/pricing 

Thu November 30, 2023 08:29 AM

How to count the Db2 connect license amount, what's mean the BY PERSON?