cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft
Microsoft

@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
Microsoft
Microsoft

@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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.