Share via

Can't connect to SQL Server to complete Learning Labs

Ammo Parmar 0 Reputation points
2026-02-25T22:10:45.2+00:00

DataSource.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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Details:

DataSourceKind=SQL

DataSourcePath=localhost;AdventureWorksDW2020

Message=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)

ErrorCode=-2146232060

Number=2

Class=20

State=0

ConnectionId=00000000-0000-0000-0000-000000000000
SQL Server | Other

1 answer

Sort by: Most helpful
  1. RatheeshKNair 6 Reputation points
    2026-02-26T07:21:31.1333333+00:00

    Make sure your SQL Server is running in local machine, if not give the correct server name.

    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.