This is a very common error faced by so many people and I get lots of questions regarding this error. This error occurs due to many reasons and I have already posted few solutions on this error, see if you can find your solution here
SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server
SQL SERVER – Fix : Error : 1326 Cannot connect to Database Server Error: 40 – Could not open a connection to SQL Server or
Recently when I was trying to create new user and connect to SQL SERVER 2008, I faced this same error and could solve it after some search which I was unaware about and thought to share it so that it would help out many people.
This is the error that occurred when I was trying to connect to SQL Server 2008. I tried to start the services of SQL Server from SQL Server Services in SQL Server Configuration Manager, but again an error occurred that the request failed.
This is the error which was found in event log viewer. And from this information provided I disabled the VIA Protocol and tried again.
To disable the VIA follow the steps:
1. Go to SQL Server Configuration Manager.
2. Click on SQL Server Network Configuration node.
3. Click on Protocols for MSSQLSERVER
4. Disable the VIA Protocol.
5. And start the SQL SERVER (MSSQLSERVER) services again.
6. As the services are started connect to SQL SERVER.
VIA is an abbreviation for Virtual Interface Adapter protocol. If you enable the VIA protocol on a computer that does not support the VIA protocol, the SQL Server service will not start.
Reference : Pinal Dave (https://blog.sqlauthority.com)