In this article I am going to explain how to resolve the Error: [Provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server (Microsoft SQL Server, Error: 2)]
When I am trying to connect the Sql server, got an error:
Cannot connect to localhost.
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 the SQL Server is configured to allow remote connections. (provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server) (Microsoft SQL Server, Error: 2).
When I have started working on this error, found this error coming because of Sql server services stop working. To start the Sql server services go to search program and files. Type “services.msc
“and click on search button. Services window will be open. Now look for Sql Server (MSSQLSERVER) and right click on it. Select the Start option. When you choose the start option a progress bar popup window will be open. When progress completed successfully it will close itself.
Now go to Sql Server and connect it.
Hope this article will helps you to resolve this issue.
What do you think about this article?
If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.