The problem is described as follows:
------- Yyc
Network-related or instance-specific errors occur when you establish a connection with SQLServer. The server is not found or cannot be accessed. Verify that the Instance name is correct and SQL SERVER has been configured to allow remote connection. (Provide: named pipeline provider, error: 40-unable to open the connection to SQL Server) (Microsoft SQL Server, error: 2)
I just encountered the above problem when logging on to the SQL Server. After combining various online solutions, I finally successfully solved the problem and sorted out the following experiences for later users.
Step 1: Open the SQL Server Configuration Manager
Double-click SQL Server Service
Step 2: if a list of services is displayed after double-clicking (I did not), locate SQL Server (MSSQLSERVER) and start the service,
If the service cannot be started. You can find the service on your computer (right-click)-Manage-services and programs, click View properties, and select "Local SYSTEM account" in the "Logon" tab ", select and then start the service.
(If a series of service lists are not displayed at the beginning of step 2, but "remote process call failed" is displayed, proceed to Step 3)
Step 3: When Visual Studio 2013 or 2012 is installed, the "Microsoft SQL Server 2013 (2012) Express LocalDB" service is automatically installed, as a result, the original SQL2008 fails to work normally.
The solution is very simple. On the Control Panel-programs and functions, find "Microsoft SQL Server 2013 (2012) Express LocalDB" and uninstall it directly, and then open the SQL Server Configuration Manager, it is displayed as normal.
After solving the problem, go back to step 2.