How Can I connect to DB2 (version v11.1.0.1527) with Function apps?


I'm trying to connect to DB2 with function apps, but I have problems with DB2 dlls. I receive this error during the debug of my function app, using latest versions of IBM.Data.DB2.Core nuget packages ( :

{'Unable to load DLL 'db2app64.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)'}

This line generate the exception:

using (DB2Connection conn = new DB2Connection(str))

The specified dll is present in folder, so someone know what should be the problem?

asked on Stack Overflow Mar 23, 2020 by Daniele • edited Mar 23, 2020 by Daniele

1 Answer


This could happen if you have the IBM.DataDB2.dll file lying around in directories other than the DB2 client install location. This could have happened without your knowledge where Visual Studio copies the necessary dll into the bin directory of the project.

Same question or the duplicate of IBM.Data.DB2.Core throws exception in azure function app

answered on Stack Overflow Mar 24, 2020 by DixitArora-MSFT

User contributions licensed under CC BY-SA 3.0