0

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

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

1 Answer 1

3

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.

2
  • Unfortunately, the first option doesn't solve the problem. I'll try the second option and see how. Dec 7, 2018 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 Dec 7, 2018 at 20:06

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