Cannot connect to local SQL Server Express 2008 R2
Some times while using SQL server R2 on local machines we get a connection error something looking like
To deal with it, there are two things we need to check
TITLE: Connect to ServerCannot connect to (local).ADDITIONAL INFORMATION:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
To deal with it, there are two things we need to check
- Try this as your server:
.\SQLEXPRESS
This error occurs if
SQLEXPRESS instance is not started. To verify the service is started or not run services.msc and look for
"SQL Server (SQLEXPRESS)" service, status should be "Started", if it is not, try to start it manually.