Make sure your SQL Server is running in local machine, if not give the correct server name.
Can't connect to SQL Server to complete Learning Labs
Ammo Parmar
0
Reputation points
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