The problem is described as follows:
-------YYC
A network-related or specific and instance error occurred while establishing a connection to SQL Server. The server was 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-cannot open a connection to SQL Server) (Microsoft SQL Server, error: 2)
I have just logged in to connect SQL Server encountered the above problems, in the synthesis of various online solutions, finally successfully resolved the problem, and finishing the following experience for later use.
Step one: Open SQL Server Configuration Manager
Double-click SQL Server Service
Step two: If a list of services appears after double-clicking (my case does not appear), locate SQL Server (MSSQLSERVER) directly, and then log on after you start the service.
If the service does not start. You can find the service in your computer (right click)-administration-Services and programs, click View Properties, select Local System account in the Login tab, and then start the service after selecting it.
(If the "Remote procedure call failed" occurs when step two starts without a list of service lists, proceed to step three)
Step three: This occurs because the Microsoft SQL Server 2013 Express LocalDB Service is automatically installed when Visual Studio 2013 or version 2012 is installed. Causes the original SQL2008 not to work properly.
The solution is simple, in Control Panel-programs and features, find "Microsoft SQL Server 2013 Express LocalDB" and uninstall it directly, and then open SQL Server Configuration Manager, it will show normal use.
Fix it and go back to step two.