This question already has an answer here:

I am using MS SQL Server 2014, When I restart my Pc the SQL Server Service does not start automatically, however, it does after Windows Shutdown and run again, how can I make it restart automatically ?

Without using batch file

marked as duplicate by LowlyDBA, Mr.Brownstone, McNets, hot2use, Vérace Dec 10 '18 at 2:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    What is the difference between two actions: (Restart) and (Shutdown and start again) ? – Yousef Albakoush Dec 7 '18 at 20:00
  • 1
    There really shouldn't be any. – LowlyDBA Dec 7 '18 at 20:01
  • The solution of using batch file is some workaround, but it should work without that, this is why asked this question. – Yousef Albakoush Dec 7 '18 at 20:11

You can set the service property to restart it (service properties --> recovery --> first / second / third failure and have a delay between each restarts e.g. 1 min). You should also, have the service set to automatic delayed start.

Alternatively, you can use powershell and schedule it in task manager to check if the service is running or not. If not running, restart it.

get-service and restart-service are your friends.

  • Unfortunately, the first option doesn't solve the problem. I'll try the second option and see how. – Yousef Albakoush Dec 7 '18 at 19:40
  • When I use this command net start "My_SQL_SERVER" in a batch file it worked and my service start, but it was working without that – Yousef Albakoush Dec 7 '18 at 20:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.