A network-related or specific and instance error occurred while establishing a connection to SQL Server. The servers were not found or could not be accessed. Verify that the instance name is correct and that SQL Server is configured to allow remote links. (Provide: Named pipe provider, ERROR:40-Unable to open connection to SQL Server) (Microsoft SQL Server, error: 2)
I have just logged in to connect to SQL Server encountered the above problem, after the integration of various online solutions, finally successfully solved the problem, and organize the experience as follows, for later use.
Step one: Open SQL Server Configuration Manager
Double-click the SQL Server service
Step two: If a list of services appears after double-clicking (my case does not appear), directly find SQL Server (MSSQLSERVER), start the service to log in,
If the service does not start. You can find the service in the computer (right-click)-Administration-Service and program, click View Properties, and select "Local System Account" in the "Login" tab and then start the service.
(If the "Remote procedure call failed" appears instead of a series of service lists at the beginning of step two, step three)
Step three: This situation occurs because the Microsoft SQL Server Express LocalDB Service is installed automatically when you install Visual Studio 2013 or version 2012. Causes the original SQL2008 not to work properly.
The workaround is simple, in Control Panel-programs and features, find "Microsoft SQL Server Express LocalDB" and uninstall it directly, then open SQL Server Configuration Manager and it will show normal use.
Resolve and then go back to step two.
"Reprint" SQL Server login Connection failed (error:40-Unable to open connection to SQL Server) solution