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

1–2 minutes

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”

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


Discover more from Nate Chamberlain

Subscribe to get the latest posts sent to your email.

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

  1. Mike Avatar

    I knew about this issue and I have always been using PowerBI to run as admin, but I have several users who are NOT admins on the box and this is not feasible solution. So other than this workaround with doesn’t work in my case, are there any other workarounds you are aware of? Thanks

  2. naevis Avatar
    naevis

    that actually workss!!!! thank you so much. i almost gave up

  3. amir Avatar
    amir

    this didnt solve the problem

  4. ddinesh Avatar

    thank you

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Nate Chamberlain

Subscribe now to keep reading and get access to the full archive.

Continue reading