Restart SQL Server

If you get a 'Failed to connect to SQL Server Error 40' and it was working before, it is possible that SQL Server stopped running.

To fix the problem you need to restart SQL Server. SQL Server should automatically restart after you restarted the computer. If it doesn't you will manually need to start the SQL Service again.
There are two ways to restart SQL Server.

Restart SQL Server - Option 1

1) Go to 'All Programs' - 'Microsoft SQL Server' and open Open 'SQL Server Configuration Manager'.
2) Click on SQL Server Services in the Left Pane.
3) Right click on SQL Sever (ROBOTILL) and select 'Start'.

Note that depending on how SQL Server was installed, it is also possible that ROBOTILL will be using the default instance of MSSQLSERVER or SQLEXPRESS.

Restart SQL Server - Option 2

1) Right click on the Windows Start Button and select Task Manager.
2) Click on the 'Services' Tab (if not there, click on 'More Details' first).
3) Click on the column heading 'Name' so that the items are sorted by name.
4) Go down to MSSQL and right click on MSSQL$ROBOTILL
5) Select 'Start'