Data Management Global

 View Only

Frequently asked questions about IBM Db2 .NET Core Provider

By Michelle Betbadal posted Wed April 29, 2020 04:39 PM


This section lists the commonly asked questions about IBM Data Server Provider support for .NET Core.


Q: Where can I find the latest package?

    Please refer to the updated blog for downloading and configuring the drivers for initial use.

Q: What other installation is needed to use this package with IBM Database servers?

      This package is self contained and no other installation is needed to connect to IBM Database servers.

Q: Does it requires a license?

    There is no additional license needed for this package. Your existing DB2Connect license should work. The downloading and configuring link above provides more information on license requirements.


Q: I have a valid DB2Connect license, how I can configure this package using the same license?

   Please refer to the blog mentioned in the beginning.

Q: Getting an Access Violation Exception when connecting to IBM i and Db2 databases from Azure. Is it a known issue?
  It is fixed in version of Db2 .NET Core. The fix is also available in Db2 .NET 5 package. In addition to using the latest packages, please set the environment variable DB2_COMMON_APP_DATA_PATH to a writable location on Azure environment with sufficient permissions to write.

Q: If I am using the earlier release of the package and created an application with it, what are the changes I should do to my application to use the latest package?
    First migrate the existing application as per suggestions from Microsoft and then update the package to avoid any project infra related issues. In some cases you may have to update the license file also.

Q: Can I use this package with full.NET framework applications?
    No, dsdriver installation is still the recommended path for full Framework(Microsoft ,NET) applications.


Q: Do I need to do any additional configuration for using this package?

     Yes,  on Linux and macOS, set the library path as described in downloading and configuring blog above.


Q: How can I validate the package for connectivity?

     A sample .NET Core Console application can validate both runtime and EF package. The instructions for creating a sample DB2 .NET Core Console application is here.


Q: Does this package affect my existing IBM dsdriver installation?

    It will not impact any existing dsdriver installation since the package installation is specific to the application. However, for this package to work, there should not be any other DB2Connect installations present in the system. We are working on to remove this restriction and currently it works on Windows.


Q: What I have to do to port my application which is written in .NET Core on Windows to Linux macOS?

     The windows specific IBM package needs to be uninstalled and linux/macOS package needs to be installed.


Q: What type of .NET applications I can write(64 bit / 32 bit / ANYCPU)?

     Currently, only 64 bit applications are supported.


Q: Which Visual Studio Versions I can use to develop my .NET Applications with this package?

      You can use Visual Studio 2017 and Visual Studio 2019 to develop .NET Core applications with this package.


Q: Is there a testconn40 type utility to validate connectivity?

    Currently there is no tool to validate the connectivity. People who are familiar with dsdriver installation, need to be aware that there is no installation involved here and deployment is per application basis and not a machine wide installation.


Q: Can I use the Db2 .NET Core packages for Windows to create .NET Core applications for Linux/macOS?

    No, there are different packages for Db2 .NET Core applications for Windows , Linux and macOS. The package for Linux ends with -lnx and -osx for macOS. However, it is possible to create application which needs to run on Linux or macOS on windows environment using platform specific packages and run the application on Linux or macOS.


Q: I have found an issue or want a new feature to be included, where can I report it?

    You can either post a question here for simple queries or contact IBM Technical support for any further assistance.


Q: I have installed the package to my application but I am not seeing any IBM .NET dlls in GAC, what is the issue?

    The package installation is specific to the application and there will not be any machine wide installation.


Q: I am a developer writing .NET application for Windows and planning to use this package with Linux. Is there anything specific I need to know?

     You have to use OS specific packages and if you are writing an application targeting Linux, then you need to pick the package which has -lnx in the name.


QI am getting the following error:

            An unexpected exception has occurred in  Process: 244 Function: AESEncryptADONET (Encryption Info)

     The .NET driver is unable to find the compatible GSKit. Set the Path(on Windows) or LD_LIBRARY_PATH(on Linux) to the <Package_Install_location>/<package-name>/<version>/build/clidriver/lib directory of your environment. Remember, this may affect other applications.

Q: What are the breaking changes in .NET Core 3.1?

  1. If LINQ query contains Skip() then UseRowNumberForPaging() must be specified in OnConfiguring() method of Context class. This applies to auto generated model via Entity Framework Tooling as well. For example:

                 optionsBuilder.UseDb2(ConnectionString, x =>{ x.SetServerInfo(IBMDBServerType.LUW); x.UseRowNumberForPaging(); });

  1. Path setting on Linux and MacOS would require to be updated. For example:

            On Linux:


            On MacOS:

                 DYLD_LIBRARY_PATH==/Users/<username>/.nuget/packages/<version>/ buildTransitive/clidriver/lib  

  1. IBMDBServerType and IBMDBServerVersion have been brought to public namespace that is IBM.EntityFrameworkCore
  2. Special characters like ‘#’ in Application path would not work.


Q: I am getting error while publishing the IBM DB2 .Net Core application to Bluemix environment. Where can I find more information on known issues and solutions?
     There are some known issues and solution listed in this link.

Last updated on 4th July 2022




Tue May 18, 2021 11:25 AM

In case anyone else was stuck on the Azure Access Violation Exception, you need to add an Application Setting under the Configuration tab.

Value: D:\home\site\wwwroot\App_Data

See the following thread for more information: IBM.Data.DB2.Core - AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Fri July 17, 2020 04:32 AM

Hi Jeremy,
 we are in the process of updating the missing links and most of the missing links are updated now. Some additional blogs needs to be re-published to complete the process.


Tue June 30, 2020 05:14 PM

Most of the links do not work