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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
beckett
New Member

Can't connect to SQL server

Hi, I'm trying to connect to an external SQL server using Power BI desktop but I'm getting an error:

 

Details: "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)"

 

I suspect this may be because the IP address Power BI is using to connect is not whitelisted on the server, does anyone know what IP I would need to whitelist to get this to work, or have any other suggestions?

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@beckett,

Are you able to connect to SQL Server from SQL Server Management Studio(SSMS)? Ensure that SSMS is installed on the same machine with Power BI Desktop.

Besides, please follow the instructions in the article below to troubleshoot this connection error.
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-th...

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
beckett
New Member

Turned out it was to do with whitelisting the IP, but I was going up a blind alley thinking the request originated from a Power BI server somewhere - actually my own IP wasn't whitelisted! Thanks for the advice everyone.

v-yuezhe-msft
Employee
Employee

@beckett,

Are you able to connect to SQL Server from SQL Server Management Studio(SSMS)? Ensure that SSMS is installed on the same machine with Power BI Desktop.

Besides, please follow the instructions in the article below to troubleshoot this connection error.
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-th...

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @beckett

 

I had some issues with connecting to MySQL databases in the past, and the solution I found was to use the 32bit version of PowerBI. 

I don't know what the version had to the with the issue but it worked. I was receiving the exact same error as you.

 

Regards

George

 

Chihiro
Solution Sage
Solution Sage

If you are able to normally connect to SQL server using connector (outside of Power BI). You should be able to connect from PowerBI without issue.

 

Try checking your connection syntax and spelling. Also 

Ex: Server = ServerName: Port#, Database = dbname

If this isn't isolated to PowerBI... then check following list for what may cause Named Pipes Provider, error: 40.

 

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2a8f2e64-74cf-46f2-b2be-bbb08b1502cb/re-nam...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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