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.
Additional Resources
SQL Events and Errors
Ed Price - MSFT edited Revision 8. Comment: Fixed fake link
Ed Price - MSFT edited Revision 5. Comment: Title update (for clarity). Adding tags
Kurt Hudson MSFT edited Revision 3. Comment: Retitled the article that Pinal Dave wrote, so that people might actually look at it.
Kurt Hudson MSFT edited Revision 2. Comment: Added a link to a very descriptive blog posting about this error - complete with screen shots
Kurt Hudson MSFT edited Revision 1. Comment: Added Events and Errors link
Kurt Hudson MSFT edited Original. Comment: Updated with the application name that produces this error message
there is one more reason after start the sqlserver service.I:e have to enable the Tcp/ip in configuration manager
hi
refer this link to resolve this kind of error when tci/ip disabled
social.msdn.microsoft.com/.../ea9f0e79-ef69-4d47-9862-d53a1e460003
by follow the below link to enable the tcp/ip property
interesante