ERROR MESAGGE:
“An error has occurred while establishing a connection to the server. When connecting to SQL Server 20xx, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 – No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)”
EXPLANATION:
You receive this error if the SQL Server service that you are trying to connect to is not running.
SOLUTION:
Make sure that your SQL Server service is running. For this:
Run SQL Server Configuration Manager and check that the SQL Server service that belongs to Instance is running from the “SQL Server Services” tab.
or you can do it from service.msc. You can find the SQL Service by typing Services.msc in Windows and you can do the necessary check in here.