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 machines 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 machines 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 with IBM. 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 can 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.

      Alternatively, these 2 licensing editions can be activated at the application/client side instead of activating at the Db2 Server side. But we don't recommend activating these licenses at the application/client side as it has to be done at every application/client side which is tedious. But if you still want to activate unlimited edition license at application/client side for some reason, activation procedure is same as mentioned in the section "How to activate non-java license for Db2 Connect Application Server Edition or Advanced Application Server Edition or Enterprise Edition" and "How to activate java license for Db2 Connect Application Server Edition or Advanced Application Server Edition or Enterprise Edition" below.

       How to activate Db2 Connect Unlimited Edition license at the Db2 server from a distributed machine:

       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.

       12.1 link

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

       11.5 link

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

       For Example:

       M0MR7EN IBM DB2 Connect Unlimited Edition for System z - Activation for Linux, UNIX and Windows

       Here M0MR7EN is the part number that needed to be used for downloading activation kit for 12.1 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/12.1?topic=z-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 substitute 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 12.1 Db2 Connect license at the Db2 Server, then 12.1 and lower version of drivers upto 9.7fp3 can connect to that Db2 Server. If you have activated 11.5 Db2 Connect license at the Db2 server then 11.5 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/client 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_consvEE.jar) while using the last 3 license models and trial license.

       How to activate non-java license for Db2 Connect Application Server Edition or Advanced Application Server Edition or Enterprise Edition or Trial

       After downloading the license activation kit from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), unzip it and 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\SQLLIB\license\db2consv_ee.lic

       where C:\Program Files\IBM\SQLLIB\license\db2consv_ee.lic is the path where you have kept the Db2 Connect license file.

       Note:

       If you are using 12.1 Db2 Connect driver, then you will need 12.1 Db2 Connect license to connect to the Db2 Server. You will not be able to use 11.5 or lower version Db2 Connect license with a 12.1 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 for Db2 Connect Application Server Edition or Advanced Application Server Edition or Enterprise Edition or Trial

       After downloading the license activation kit from PPA(https://www.ibm.com/software/passportadvantage/pao_customer.html), unzip it and copy the java license (Eg: db2jcc_license_consvEE.jar) to your machine where the application is residing. Add the path of the license jar (Example: C:\Users\smathai\Downloads\db2jcc_license_consvEE.jar) to the CLASSPATH environment variable.

       Note:

       Db2 Connect license need to be reactivated only when you migrate from one major version (11.5) of Db2 Connect to another major version (12.1) of Db2 Connect. For example, while migrating from 11.5.9.0 to 12.1.0.0, you need to download the activation kit of 12.1.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.8.0 to 11.5.9.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 substitute with your database name, xyz.ibm.com need to replace 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 activation kit from PPA (https://www.ibm.com/software/passportadvantage/pao_customer.html), unzip it and 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\SQLLIB\license\db2consv_ee.lic

      where C:\Program Files\IBM\SQLLIB\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 12.1 Db2 Connect Gateway/Server, then you will need 12.1 Db2 Connect license to connect to the Db2 Server. You will not be able to use 11.5 or lower version of Db2 Connect license with a 12.1 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 drivers can be downloaded from the below nuget link      

     Windows
     https://www.nuget.org/packages/Net.IBM.Data.Db2
     Linux
     https://www.nuget.org/packages/Net.IBM.Data.Db2-lnx
     Mac
     https://www.nuget.org/packages/Net.IBM.Data.Db2-osx

         

      EF Core for .NET 8, .NET 7, .NET 6 can be downloaded from the below nuget link

      Windows
      https://www.nuget.org/packages/IBM.EntityFrameworkCore
      Linux
      https://www.nuget.org/packages/IBM.EntityFrameworkCore-lnx
      Mac
      https://www.nuget.org/packages/IBM.EntityFrameworkCore-osx

      “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

Java driver license changes in Db2 Connect 12.1 release

      Refer to "Java driver license requirement" section in the below links

     https://community.ibm.com/community/user/datamanagement/blogs/shilu-mathai2/2024/11/15/points-to-consider-while-upgrading-to-db2-connect?CommunityKey=5f34857e-d55b-404b-9806-a571c485c1ff

     https://www.ibm.com/support/pages/features-behavior-change-while-upgrading-db2connect-121-driver

Almost everything about Db2 Connect

     https://community.ibm.com/community/user/datamanagement/blogs/shilu-mathai2/2024/09/23/almost-everything-about-db2-connect

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

4 comments
716 views

Permalink

Comments

Mon September 23, 2024 02:21 AM

After a successful installation, .swidtag is will be seen under properties\version folder of the driver/client package installation

For example, after IBM Data Server Driver Package installation the following file be created.

C:\Program Files\IBM\IBM DATA SERVER DRIVER\properties\version\ibm.com_IBM_Data_Server_Driver_Package-11.5.0.swidtag

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?