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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Unable to connect - We encountered an error while trying to connect,An error happened while reading

Hi, 

 

Few days back when i tried connecting to SQL server, it was connecting perfectly,  But unfortunately now i could not be able to connect SQL data. In server i can see databases. But i could not get in PowerBI.

 

I am facing this error - 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=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'

 

Kindly please help me in resolving this issue, Help me to access my databases through PBI. 

 

Thanks & Regards, 

Naresh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

In data source setting, could you Please remove the existing connection for SQL server and try one more time.
You can also set the permission level while editing the data source
Regards,
Amit

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

You could try to reinstall your .NET Framework (4.0 or above) and restart your computer. Then please try to run as administrator to open Power BI Desktop and re-connect to SQL server.

 

Click this link if you need to download a .NET Framework.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

 

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-xuding-msft Thanks for providing me suggestions.

 

I tried all the ways which you suggested, But i am unable to connect to my data base, Kindly please help me in resolving the same. 

 

Here is the error - Unable 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=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'"

 

Regards, 

Naresh  

Anonymous
Not applicable

Hi @Anonymous ,

In data source setting, could you Please remove the existing connection for SQL server and try one more time.
You can also set the permission level while editing the data source
Regards,
Amit

Anonymous
Not applicable

@Anonymous , Thanks a lot Amit, 

 

It worked for me. Best solution i got. 🙂 

 

Regards, 

Naresh

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors