For my customer, due to the lack of support for .Net 2, I have upgraded all their services to .NET 6 and for this reason I also had to upgrade Db2 drivers.
I replaced "IBM.Data.DB2.Core-lnx" Version="1.3.0.100" with "Net.IBM.Data.Db2-lnx" Version="6.0.0.300" and adjusted the code to the new namespaces. Everything nicely compiles.
But it does not work in a docker container after the upgrade.
We are getting the following error:
"IBM.Data.Db2.DB2Exception (0x80004005): ERROR [42968] [IBM] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968"
I've made sure that the existing licence is still there in the right folder.
I also tried putting the licence in the folders recommended here:
https://community.ibm.com/community/user/datamanagement/blogs/vishwa-hs1/2020/07/12/db2-net-packages-download-and-configure
by adding the following lines to Dockerfile:
COPY Src/AuroraExport/db2consv_is.lic $HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/license/
ENV DB2_CLI_DRIVER_INSTALL_PATH="$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidrive"
ENV LD_LIBRARY_PATH="$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/lib:$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/lib/icc"
ENV PATH=$PATH:"$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/bin:$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/lib:$HOME/.nuget/packages/net.ibm.data.db2-lnx/6.0.0.300/buildTransitive/clidriver/adm"
and still getting the same error.
I believe the licence we used with .NET 2 is still correct, it expires only in 2037.
Here are a few non-sensitive parts of the licence - please let me know if you see any problems here:
[LicenseCertificate]
...
ProductName=DB2 Connect Unlim Ed iSeries
ProductID=1411
ProductVersion=11.1
LicenseStartDate=02/15/2016
LicenseDuration=7991
LicenseEndDate=12/31/2037
...
Please help, it's a very critical issue as the import/export features stopped working in production.
------------------------------
Lukasz Szkup
------------------------------