When you are trying to connect to a SQL Server using Microsoft SQL Server Management Studio, you may see the following message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessbile. 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).
While the message tells you to check some of the items that can cause this issue, it fails to mention that if your SQL Server Service is not started, then you cannot connect. One of the first things that you should check is that the SQL Server (MSSQLSERVER) is started. You can go to the Services Console (services.msc) and look for SQL Server (MSSQLSERVER) to see that it is started. If not, then start the service.
You could also do this through an elevated command prompt by typing net start mssqlserver.
If the service is started and you still cannot connect, you should check all the connection points. For detailed steps on troubleshooting this issue, see Resolving SQL Connection Errors Step-by-Step by Pinal Dave.
SQL Events and Errors
there is one more reason after start the sqlserver service.I:e have to enable the Tcp/ip in configuration manager
refer this link to resolve this kind of error when tci/ip disabled
by follow the below link to enable the tcp/ip property