“Unable to connect” error when accessing SQL database in Power BI Desktop

This article was originally published on January 16, 2019. Product interfaces and features may have changed. Some original images are not yet available.

When attempting to access a SQL server/database in Power BI, you might get the following error message:

Unable to connect

We encountered an error while trying to connect.

Details: “An error happened while reading data from the provider: ‘Could not load file or assembly ‘System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=…..

Error message received when trying to get a SQL database as a data source in Power BI

Solution

You just need to run Power BI as administrator before attempting to access the SQL database as a data source.

  1. Save your work and close Power BI Desktop
  2. Right click Power BI Desktop and select “Run as administrator”
Original image unavailable.

3. Attempt to access your database again – you shouldn’t have an issue.

Preserved with its original publication date. Original archived version.