Failed to connect to the database. DB2 -Azure data factory

Sridhar Hariharan-CIC 21 Reputation points
2021-06-07T09:57:48.253+00:00

Hi,
Have started using Azure trial subscription, As part of this Azure Data factory resource is created and would like to explore extraction part from the source. Have installed Integrated runtime (Selfone) and could see options (Diagnostics -> DB2 ->Entered IP/ Port , Databasename, Credentials ) but its failing with Failed to connect to the database. Error message: The type initializer for 'Microsoft.HostIntegration.Common.TelemetryClient' threw an exception.
Could not load file or assembly 'file:///C:\Program Files\Microsoft OLE DB Provider for DB2\System\Microsoft.ApplicationInsights.dll' or one of its dependencies. The system cannot find the file specified.

How to fix this one?
Regards
Shreedhar.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

Accepted answer
  1. SandipKhandelwal-MSFT 96 Reputation points Microsoft Employee
    2021-06-15T09:25:32.31+00:00

    Hello Sridhar,

    Somehow dependent DLL i.e. Microsoft.ApplicationInsights.dll is missing from installation OLEDB provider installation path : C:\Program Files\Microsoft OLE DB Provider for DB2\System

    Steps to get DLL :

    1. Go to nuget package portal : https://www.nuget.org/packages/Microsoft.ApplicationInsights
    2. Download package Microsoft.ApplicationInsights
    3. Change extension to zip
    4. Extract package
    5. DLL Microsoft.ApplicationInsights.dll should be present in library : microsoft.applicationinsights.2.17.0\lib\net46
    6. Copy this DLL to library : C:\Program Files\Microsoft OLE DB Provider for DB2\System and try again.
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Vipin Gupta 1 Reputation point
    2021-06-30T14:10:28.687+00:00

    @Sridhar Hariharan-CIC ,

     Did you have OLEDB driver install on the VM or machine before installing Integrated runtime ? ADF DB2 connector is built on top of Microsoft OLE DB Provider for DB2. ADF copies all DLLs include dependencies during installation of Integration runtime. If you already have OLEDB driver on the VM then dependent DLL required by ADF wont be copied.   
    

    If you already had OLEDB driver then uninstall it and Integration runtime and then reinstall Integration runtime.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.