There might be several reasons when you try to connect to an SQL Server Instance but it fails. The Server is reachable but it might not be possible to connect to its instance.
Sample Error:
Cannot connect to ServerName.
ADDITIONAL INFORMATION:
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) (Microsoft SQL Server, Error: 53)
In such cases, Look for the following:
Open the following ports and Programs:
- Management Studio In Program -- At Client
- Management Studio Out Program -- At Client
- TCSP Port 1433 -- At Target Server
- UDP Port 1434 -- At Target Server
- sqlservr.exe IN -- At Target Server
- Open the port TCP 8080 to make sure that Machine is able to connect to outside the network -- At Client