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:
- The SQL Server name/instance in the connection dialog is wrong.
- The SQL Server instance is not running or not reachable over the network.
- Required protocols (TCP/IP or Named Pipes) are disabled.
- 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:
- 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.
- 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
- 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
sqlcmdas 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.
- From that same machine, test a local connection using SQL Server Management Studio (SSMS) or
- 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.
- 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.
- Test basic network connectivity (if you control the client/server)
- Use
ping <server-name>orTest-NetConnection/Test-ConnectionPowerShell 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.
- Use
- 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.
- 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:
- A network-related or instance-specific error occurred while establishing a connection to SQL Server
- how to fix SQL server management on my PC - Microsoft Q&A
- "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login timeout expired". can i fix ? - Microsoft Q&A
- how to fix this error in SSMS error 40 - Microsoft Q&A
- Set up the Power BI dashboard