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 6 and .NET 7 based applications
Db2 .NET driver for Microsoft .NET 6 and .NET 7 (The package name is Net.IBM.Data.Db2)
IBM EntityFrameworkCore for ,NET 6 and .NET 7
For .NET5 based applications
Db2 .NET driver for Microsoft .NET 5(The package name is Net5.IBM.Data.Db2)
IBM EntityFrameworkCore for .NET 5
For .NET Framework based applications
EntityFramework 6.4 (For .NET Framework)
For .NET Core based applications(Out of support)
Db2 .NET Core 3.1.0.400
IBM EntityFrameworkCore 3.1.0.400
Supported platforms and download link for Db2 .NET 6 and .NET 7 packages
Supported Operating Systems:
- Windows x64
- Linux AMD64(known exception Alpine Linux)
- MacOS
All packages are available for download from NuGet repository.
License requirements
Version
|
IBM license version
|
To be placed at
|
7.0.0.<version>
|
V11.5*
|
C:\Users\<users>\.nuget\packages\net.ibm.data.db2\7.0.0.<version>\buildTransitive\clidriver\license
|
6.0.0.<version>
|
V11.5*
|
C:\Users\<users>\.nuget\packages\net.ibm.data.db2\6.0.0.<version>\buildTransitive\clidriver\license
|
5.0.0.200
|
V11.5*
|
C:\Users\<users>\.nuget\packages\net5.ibm.data.db2\5.0.0.200\buildTransitive\clidriver\license
|
3.1.0.400
|
V11.5*
|
C:\Users\<users>\.nuget\packages\ibm.data.db2.core\3.1.0.200\buildTransitive\clidriver\license
|
*Notes:
- Starting with .NET Core 3.1.0.200, the license files are to be placed inside the buildTransitive folder instead of the build folder earlier. For example:
On Windows:
C:\Users\<username>\.nuget\packages\ibm.data.db2.core\<version>\buildTransitive\clidriver\license
On Linux:
$HOME/.nuget/packages/ibm.data.db2.core-lnx/<version>/buildTransitive/clidriver/license
On MacOS:
/Users/<username>/.nuget/packages/ibm.data.db2.core-osx/<version>/buildTransitive/clidriver/license
- For Db2 .NET 5, the value packages\ibm.data.db2.core\ should be replaced by packages\net5.ibm.data.db2\ since there is a change in package name.
- For Db2 .NET 6 and above, the value packages\ibm.data.db2.core\ should be replaced by packages\net.ibm.data.db2\
- 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, its important to make sure the path has write permission.
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 Data Provider for .NET 6 and .NET 7
Breaking changes in Db2 .NET 6
- 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.
Breaking changes in Db2 .NET 5
- There is a change in the package name for .NET runtime and is changed to Net5.IBM.Data.Db2.
- The assembly namespace has changed to IBM.Data.Db2. It was IBM.Data.DB2.Core for Db2 .NET Core packages.
- Version 5.0.0.400(latest) -- Support for Row Change Timestamp columns with IBM EF Core provider.
Known limitations
Please refer to known limitations page for set of known limitations.
Last updated On 19th April 2023
#DataManagementGlobal
#DataServerDrivers