Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  IBM.Data.DB2.Core error in new DB2Connection(connectionString)

    Posted Thu October 08, 2020 04:40 AM

    We have the IBM.Data.DB2.Core (3.1.0.300) nuget package installed in our .netstandard2.1 application library, to connect to an external DB2 instance on prem.

    On running the following code from a .net core azure function v3 Windows 64bit (from a netcoreapp3.1 project)

    var connectionString= "Server=DB2_IP:DB2_Port;Database=DB2_DBNAME;UID=DB2_UserId;PWD=DB2_Password;" var connection = new DB2Connection(connectionString); (note the values in the connection string are placeholders for anonymity)

    We are receiving the following error

    IBM.Data.DB2.Core.DB2Exception (0x80004005): ERROR [58005] [IBM][DB2.NET] SQL0902 An unexpected exception has occurred in Process: 21308 Thread 33 AppDomain: Name:Microsoft.Azure.WebJobs.Script.WebHost There are no context policies. Function: AESEncryptADONET (Encryption Info) CallStack: at System.Environment.get_StackTrace() at IBM.Data.DB2.Core.DB2ConnPool.HandleUnknownErrors(String strFncMsg, Exception exception, Boolean bThrow) at IBM.Data.DB2.Core.DB2ConnPool.EncryptString(String value) at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended) at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value) at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)

    Does anyone have any idea where we're going wrong?






    #Db2
    #Support
    #SupportMigration


  • 2.  RE: IBM.Data.DB2.Core error in new DB2Connection(connectionString)

    Posted Fri March 05, 2021 08:33 AM

    Hi Sarah,

    Did you found any solution for this issue, actually I am facing same issues. If you got a solution then please help me to resolve same issue.

    Thanks

    Praveen Soni






    #Db2
    #Support
    #SupportMigration


  • 3.  RE: IBM.Data.DB2.Core error in new DB2Connection(connectionString)

    Posted Sun March 07, 2021 10:18 PM

    Hi Praveen,

    There were 2 issues with our case. First, we had to make sure to set the function app to 64 bit, and same in project settings (as 32 bit is not supported). But the main issue was the DB2 server needed to have the DBConnect license installed. Once that was done the connection issue resolved almost straightaway






    #Db2
    #Support
    #SupportMigration


  • 4.  RE: IBM.Data.DB2.Core error in new DB2Connection(connectionString)

    Posted Mon March 08, 2021 02:04 PM

    Mister sarah.wood

    Please your help, with more information I have the same problem but I do not know the issue of db conect license






    #Db2
    #Support
    #SupportMigration


  • 5.  RE: IBM.Data.DB2.Core error in new DB2Connection(connectionString)

    Posted Tue March 09, 2021 01:02 AM

    You will need to discuss further with your dB2 Vendor I'm afraid






    #Db2
    #Support
    #SupportMigration