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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
WW
Frequent Visitor

Unable to connect Power BI to SQL

Hello all, 

 

I am facing this error for a few days and it's driving me crazy. I just downloaded Power BI Desktop and hope to connect it to my SCCM database. I have disabled my firewall, check my IP portal, remote connection from SQL is enabled.

I am able to login to my SQL, my accout is fine, I am able to connect to the DB from the same connector, just not with Power BI. Is there any settings I might have missed?

 

Error Message(s) as follow, (it seems to change between the variant)

1) Data Source.Error: Microsoft SQL: A network -related or instance-specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL server is configured to allow remote connections. (Provider: Named Pipes Provider, error 40 - Could not open a connection to SQL server)

2) DataSource.Error:

3) User was not authorized (Prompted at credential popup).

 

Help, anyone! Thanks!

 

5 REPLIES 5
Anonymous
Not applicable

Hi WW,

Could you please firstly use SQL Server Management Studio to connect to the remote SQL Server instance and check if it is successful? If it also fails, please follow the steps in this blog to troubleshoot this issue.

In addition, we need to verify that if you use a Windows login or SQL login to connect to SQL Server, and how you specify the settings in the following screenshot.
111.png

 


Thanks,
Lydia Zhang

WW
Frequent Visitor

Hi Lydia,

 

I am able to successfully connect to the remote SQL Server instance from another server. I have used both Windows and Database login, but error appears on both.

Anonymous
Not applicable

Hi WW,

Please check that if you can successfully connect to SQL Server from other application(such as Excel) which is installed in the same server with Power BI Desktop.

And use “IP address, port” or “tcp:computername” as server name to connect to SQL Server in Power BI Desktop.


Thanks,
Lydia Zhang

WW
Frequent Visitor

Hi Lydia,

 

Thanks for your reply, I have the same error using Excel (Power Query). I tried both tcp:computername and IP,port is still got stuck at "The User was not authorized" message. However I am able to connect from another machine 's SQL management studio to this DB and it works. Not sure what else I have missed...

Anonymous
Not applicable

Hi WW,

Based on my test, in the following screenshot, when we specify a login account that doesn’t exist in SQL Server, or we specify an existing SQL login in the Windows page or specify a Windows login in the Database page, the above error message could occur.
large.png

Please describe more details about that how you specify the settings in the above screenshot. Also make sure that you right click Power BI Desktop and choose “Run as administrator” to start it. Besides, delete the cache and the old data source connections related as described in this blog.


Thanks,
Lydia Zhang

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.