[Resolved] Visual Studio Connect to Microsoft SQL Server Database Failed - A network-related or instance-specific error occurred
Issue: Visual Studio Connect to Microsoft SQL Server Database Failed - A network-related or instance-specific error occurred
Error Message:
Steps:
We are not able to see the list of databases and we can select.
Error Message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server.Description: When attempting to connect to a database from Visual Studio, if you are getting a message from Visual Studio Data Connection that it was not able to connect to SQL Server, check the following workaround.
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: 1326)
Steps:
- Open Visual Studio > Tools > Connect to Database
- Choose Data Source > Continue
- The Server Name auto populates
- If you proceed with the auto populated server name, and try to select databases below, the following error is displayed
- Open Visual Studio > Tools > Connect to Database
- Choose Data Source > Continue
- The Server Name auto populates
- Edit the server name to "Computername\SQL Server instance"
We are not able to see the list of databases and we can select.
- Select the required database
- Test Connection.
- Click OK
No comments