none
Sheduled SQL restart does not work RRS feed

  • Question

  • Hello,

     Windows 10 Pro. Because of periodic slowdowns of SQL server, I decided to create a daily event for restarting SQL server instance service as a workaround. So I created nightly stop-start shedule events for the instance:

     NET Stop "mssql$myinstance" - sheduled on 11:30PM

     NET Start "mssql$myinstance" - sheduled on 11:32PM

    Both running with highest priviledges, password provided during setting up the event.

    I created them at the end of April 2019 and it worked for maybe few days (under "Application" node there were MSSQL start/stop  events logged), probably until some system update. Since then, I've been unable to make the sheduled events work, deleted them and created again, tried many solutions, no luck. The sql server is not restarting automaticaly anymore. The only logged event on 11:30PM/11:32PM is 1534 which I apparently should not care about, since it is just a notification that the action could not be logged.

    Any reason for such behaviour? How can I trace the problem to find out what exactly happens when system is trying to execute NET command?

    Thank you

    Best regards

    Krzysiek

    Wednesday, May 22, 2019 6:24 AM

All replies

  • So you have a scheduled Windows task that doesn't start? I'd go to the windows forums and ask there. First thing would be to enable logging and check the logs for that scheduled task, but how/where to do that is an OS question and possibly depends on what OS you have.

    Tibor Karaszi, SQL Server MVP (Web Blog)

    Wednesday, May 22, 2019 10:39 AM
    Moderator
  • Thank you, I will try your suggestions.
    Wednesday, May 22, 2019 11:57 AM
  • Thank you, I will try your suggestions.
    Hi Krzysiek,

    If you have resolved your issue, please close the thread by marking the useful reply as answer. This can be beneficial to other community members reading the thread.

    In addition, if you have another questions, please feel free to ask.
    Thanks for your contribution.

    Best regards,
    Cathy Ji
     

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, May 23, 2019 7:30 AM