Share via

Get Data With Power BI - unable to get data from SQL Server

KF-3028 0 Reputation points
2026-02-28T15:53:48.6066667+00:00

in taking course via learn.microsoft.com - get data with power bi, I receive (for 2 days now) msg - Unable to Connect. "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)"

How can I resolve this? I have performed the prior steps several times...

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-28T15:54:11.6066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates that Power BI cannot reach the SQL Server instance used in the training lab. This is a generic connectivity failure (“provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server”) and is typically caused by one of the following:

    1. The SQL Server name/instance in the connection dialog is wrong.
    2. The SQL Server instance is not running or not reachable over the network.
    3. Required protocols (TCP/IP or Named Pipes) are disabled.
    4. A firewall or network rule is blocking access.

    Because this is a hosted training scenario, the most likely causes are an incorrect server name or a transient/unavailable lab environment.

    Use these steps to troubleshoot:

    1. Verify the server name exactly as provided by the course
      • In Power BI Desktop, when selecting Get Data > SQL Server, ensure the Server value matches the lab instructions exactly (including instance name if any, for example ACCNT27\PAYROLL).
      • Connection failures are common when the server name or instance name is misspelled or incomplete.
    2. Confirm that the SQL Server instance is running and reachable
      If the lab gives access to a VM or remote SQL Server:
      • From that same machine, test a local connection using SQL Server Management Studio (SSMS) or sqlcmd as described in the local test procedure. If a local connection fails, the SQL Server service may not be running or the login may not be authorized.
    3. Check that SQL Server protocols are enabled
      If there is access to SQL Server Configuration Manager on the lab server:
      • Open SQL Server Configuration Manager.
      • Go to SQL Server Network Configuration → select the SQL Server instance.
      • Ensure TCP/IP is enabled. If it is disabled, enable it and restart the SQL Server service.
      • If remote connections are required, TCP/IP must be enabled; otherwise, remote clients (including Power BI Desktop) will fail to connect.
    4. Check firewall and port configuration
      • Determine whether the SQL Server instance uses a static port (commonly TCP 1433) or dynamic ports.
      • If dynamic ports are used, ensure the SQL Server Browser service is running and UDP port 1434 is not blocked.
      • If a static port is used, ensure that port is open in the firewall and that the connection string includes the port if required.
    5. Test basic network connectivity (if you control the client/server)
      • Use ping <server-name> or Test-NetConnection / Test-Connection PowerShell cmdlets to verify that the server name resolves and is reachable.
      • If ping by IP works but ping by name fails, use the IP address in the Power BI connection until name resolution is fixed.
    6. If only SSMS is installed locally
      • For local practice, ensure that an actual SQL Server instance is installed in addition to SSMS. SSMS alone is just a client; it does not include the Database Engine. Without a local SQL Server or a reachable remote instance, Power BI cannot connect.
    7. If the issue persists only in the Learn course lab
      • Since the error has occurred for multiple days and after repeating the steps, the lab’s hosted SQL Server environment may be unavailable or misconfigured. In that case, the resolution is outside client control and requires the course/lab provider to fix the backend. Use the course’s support or feedback channel to report that the lab SQL Server endpoint is not reachable.

    These steps address the common root causes of the Named Pipes Provider, error 40 / Error 53 / login timeout scenarios when connecting from tools like Power BI or SSMS.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.