Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

DB2 support - Default driver not working

When choosing IBM DB2 database as data source, nothing works until we go under Advanced Options and choose IBM as the driver instead of Microsoft.  It should default to a working driver without the users having to go into advanced options.

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

Is there any error occurs when you use the default driver Microsoft to get data? 

 

Based on my test with Power BI desktop 2.70.5494.701 64-bit (June 2019), it's able to connect to IBM DB2 use default Microsoft driver. Please note it requires .NET 4.5 or later. Please update your Power BI desktop to the same version as ours then test again. 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Yes I have the exact same Power BI version as yours, downloaded it just a couple of days ago.

 

The error message is:

"

Unable to connect

We encountered an error while trying to connect.

 

Details: "An error happened while reading data from the provider: 'The type initializer for 'Microsoft.HostIntegration.Common.TelemetryCLient' threw an exception.'"

 

I have installed .NET runtime 4.8 and rebooted my PC, exact same error.

 

 

 

 

v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

Please create a support ticket to get dedicated support. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Opening a support ticket requires a Pro subscription? We don't have that.

v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

You can contact your admin and let your admin create a support ticket for you. 

 

Best Regards,
Qiuyun Yu 

DanielAdler
Frequent Visitor

I experience the same problem and it seems to occur when Micorosfts DB2 OLEDB driver is installed on the same system as Power BI Desktop.

 

On my system when I install the driver DB2OLEDBV6_x64 and try to connect to the DB2 database with Power BI Desktop I get the error Details: "An error happened while reading data from the provider: 'The type initializer for 'Microsoft.HostIntegration.Common.TelemetryCLient' threw an exception.'"

 

When I uninstall the driver, The default .NET DB2-driver in Power BI Desktop works as a charm.

 

Googling for Type Initializer errors suggests there is some kind of mismatch between versions of .NET between the drivers and that the DB2OLEDB-driver imposes something that makes Power BI Desktop to load mismatching versions of code.

 

Also, this affects Power BI Report Server as well which suggests it is on an driver installation level.

 

@Anonymousand @v-qiuyu-msft : Great if you could try this out.

 

Best regards,

Daniel

 

Anonymous
Not applicable

Thank so much Daniel, that did it!  In my case, this was the driver that I had to uninstall before the default Microsoft driver can work normally.

screenshot.2019-06-26.jpg

 

It might break something else on my workstation, but at least now we know.  🙂

DanielAdler
Frequent Visitor

Yes, that is the one for me as well. The name of the installation file is DB2OLEDBV6_x64.msi. 

On my server it broke a Linked Server in SQL Server when I uninstalled the driver.

DanielAdler
Frequent Visitor

So, I looked further into this by tracing what registry keys the MS DB2 OLEDB Provider created during installation. 

After some searching regarding Host Integration and Telemetry (the error being 'The type initializer for 'Microsoft.HostIntegration.Common.TelemetryCLient' threw an exception.'), I found that the installation of the DB2 OLEDB provider actually installs part of the Host Integration Server (made for integrating IBM server applications, e.g. DB2, with Microsoft Server products, https://docs.microsoft.com/en-us/host-integration-server/what-is-his).

Apparently the HIS includes a telemetry module to collect statistics, and in the documentation it says that the UI has an on/off toggle as well as a PowerShell way to toggle it.

So, I found the corresponding registry key that disables the Telemetry module i HIS, and voilá, now Power BI Desktop, Power BI Report Server works without error, even when the MS DB2 OLEDB-provider is installed.

The registry key to change is HKLM\SOFTWARE\Microsoft\Host Integration Server\Telemetry\Enabled which needs to be set from "true" to "false".

I understand that the problem is that the Telemetry module in HIS is dependent on a .NET library version that is not compatbile with the .Net version used be Power BI DB2-provider.

NB: Changing the registry key is of course not a Microsoft-supported fix, so use it if you (think) you know what you're doing. But it made my day finding it out at least.

Anonymous
Not applicable

Wow that's a nice find! I'll certainly try this if it's still an issue after DB2 11.5 is released.