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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
perpor
Helper V
Helper V

Unable to connect Power BI to SQL server db on the same computer

I works a lot with Power Bi and Sql server, from many months, with the db on a server remote, no problems.

I have created a Sql server db on my computer, where Power BI is installed, and I can connect to SQL Server from SQL Server Management Studio(SSMS), with no problems (with windows authentications).

Using PowerBI I have the following error, fig. 2:

"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 a1.jpga2.jpga3.jpgconnections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

(with connections see fig. 1)

but the server is configured to allow remote connections, see fig. 3

help

15 REPLIES 15
Akram
New Member

I have same problem, trying to connect to remote sql Server.
Anvil
New Member

 How to Connect to remote sql server from power bi desktop to author visualizations? Is it necessery to open Tcp port to connect to sql server on aws EC2 instance. I have security concerns ... Needs urgent help

perpor
Helper V
Helper V

so it works, see fig, I can see all the tables of the db. But if I use 'Advanced options' with a query, I have the error...a4.jpg

But I can't write any query, there is always the error writing a query...

@perpor,

What error message do you get when you write a query in Power BI Desktop? In your scenario, please make sure the following things.

1. Ensure that you use the latest version of Power BI Desktop(2.50.4859.502).
2. Ensure that the query you write runs without issues in SQL Server Management Studio.
3. Specify machine name\instance name or IP\instance name as Server when connecting to SQL Server in Power BI Desktop.


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.

Error is always:

 

"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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

 

and I have verified many times the points 1., 2., 3., always ok

 

 

I have tried also with a sql server connection, not onlt with windows connection, and I have create a user on db with permissions,

but the problem is always the same

@perpor,

How about you connect to SQL Server in Excel and write query?

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.

I have the same error... 

@perpor,

There are some proposals for you troubleshooting this issue.

1. Enable TCP/IP in SQL Server Configuration Manager(SSCM).
2. Configure a static port for your SQL instance in SSCM.
1.JPG
3. Restart SQL Server Service in SSCM.
4. Launch Power BI desktop with admin privileges, go to “File –> Options and Settings –> Options –> Data Load” to clear cache in Power BI Desktop, then connect to SQL Server by using "tcp:machinename,port" as Server, and write query to check if the connection is successful.
2.JPG

If you still get error, please post the screenshot about the connection in Power BI Desktop.


Regards,

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.

Hi,

 

I find a similar issue when trying to connect to Azure SQL DB. I can connect to the Server and load any table I want, but when trying to run a select statement I get an Authentication Error message (See attcahed). The select statement runs without a problem from SSMS, but in Power BI, no, even after using the proposed solution. I tried authenticating with the Admin of the SQL DB, and I got the same error. Again, this error is only when I try to run a select statement in the Advanced Options.

 

Any suggestions are very welcome!

 

Connection_to_AzureSQLDB.PNG 

@v-yuezhe-msft Thank you, works perfectly.


I have tried in the last few minutes and everything worked,

I swear that I did nothing more than what I did before last weeks, there are also the screenshots ... bo ...

 

true that now I have a new version of Power BI, but the version of Excel is always the same...

I have same problem, please what should I do?

I have always the 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

 

 

and ONLY with this db and ONLY when I write a query, if I import the whole tables everything is ok

 

PLEASE HELP HELP HELP !!!!!!!!!!!!!!!!!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors