Data Management Global

Data Management Global

A hub for collaboration, learning, networking, and cultural exchange, and contributing to positive global engagement

 View Only

Downloading and initial configuration of Db2 .NET NuGet Packages

By Hosathota Vishwanatha posted Sun July 12, 2020 11:33 PM

  

The article lists the basic information needed to use the Db2 .NET Driver packages. The write up captures the important information on choosing the Db2 .NET drivers, downloading and configuring them for first use. The document will not go into any specific application scenarios as they are covered in detail in other blogs.

Recommended latest IBM Db2 .NET drivers

For .NET 9 based applications
Db2 .NET driver for Microsoft .NET 9

IBM EntityFrameworkCore for .NET 9

For .NET 8 based applications
Db2 .NET driver for Microsoft .NET 8
IBM EntityFrameworkCore for .NET 8


For .NET Framework based applications
EntityFramework 6.4 (For .NET Framework)

Supported platforms and download link for Db2 .NET 8 and .NET 9 Packages

Supported OS Db2 .NET Runtime Package Db2 EF Core Package Remarks
 Windows x64 Net.IBM.Data.Db2 IBM.EntityFrameworkCore
 Linux AMD64 Net.IBM.Data.Db2-lnx IBM.EntityFrameworkCore-lnx
 MacOS - AMD64 Net.IBM.Data.Db2-osx IBM.EntityFrameworkCore-osx This is only supported till .NET 8 up to version 8.0.0.300
 MacOS - ARM64 Net.IBM.Data.Db2-osx Yet to be supported Db2 .NET support is available only from .NET 9 onwards
 Linux on IBM Z Net.IBM.Data.Db2-zlnx Not available
 Linux for Power - ppc64le Net.IBM.Data.Db2-ppc Net.IBM.EntityFrameworkCore-ppc  .NET 9 package needs v12.1 license

All packages are available for download from NuGet repository and only listed packages are supported and are to be used.

 
License requirements

.NET Version

License version

To be placed at

.NET 8.0.0.300

V11.5*

C:\Users\<users>\.nuget\packages\net.ibm.data.db2\<VERSION>\buildTransitive\clidriver\license

.NET 8.0.0.400

V12.1

Same location

.NET 9 and above

V12.1

Same location

*Notes:

  • The VERSION above corresponds to NuGet package version and examples include 8.0.0.300 and 9.0.0.100.
  • Version specific defect fixes and enhancements list is available in Readme file of each package.
  • On Azure Environment, the environment variable DB2_COMMON_APP_DATA_PATH should be set to be a writable location. This is one of the common issues noticed in recent times for license error -1598. After setting the above environment variable, it's important to make sure the path has write permission.
  • The license file for .NET 8.0.0.300 and .NET 9.0.0.100 are different as highlighted in license file section above.
  • For MacOS, from .NET 8.0.0.400 / .NET 9 onward only ARM64 is supported.
  • For AMD64 applications, the package .NET 8.0.0.300 needs to be used.
  • For .NET 8 development, both 8.0.0.300 and 8.0.0.400 versions will coexist at NuGet repository. 
  • If applications use Skip(..) in LINQ query, it's recommended to configure UseRowNumberForPaging() in OnConfiguring method of Context class.

For example:
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseDb2(ConnectionString, x =>
{ x.SetServerInfo(IBMDBServerType.AS400); x.UseRowNumberForPaging(); }
);

Related Db2 .NET package blogs

For .NET Core packages, follow the below link to get started and explore more scenarios with Db2 .NET Core packages.

Getting started with IBM Db2 .NET NuGet packages

 
Breaking changes for applications moving from older versions of .NET (.NET 5 and below) to .NET 8 and above

  • There is a change in the package name for .NET runtime and is changed to Net.IBM.Data.Db2. This name will remain same for future versions also.
  • In some docker related scenarios, the path of clidriver\bin may need to be added to path variable.

Known limitations

Please refer to known limitations page for set of known limitations.

For any queries on these packages, please use Contact owners option in NuGet repository.


Last updated on 9th May 2025


#DataManagementGlobal
#DataServerDrivers

11 comments
607 views

Permalink