MSSQLSERVER service keeps randomly stopping

  • So the joys, the MSSQLSERVER service is randomly stopping no rhyme or reason for this. And then it takes out the SQLSERVERAGENT and no jobs run.

    I have had a look at the logs and it does mention access is denied, this is the error from the logs:

    AutoRestart: Unable to restart the MSSQLSERVER service (reason: Access is denied)

     However both the NT SERVICE\SQLSERVERAGENT and NT Service\MSSQLSERVER have sysadmin privileges.

    All other settings and permissions are fine (I did some research before this post on permissions I might have missed or any settings). And nothing has changed on the server, we haven't touched it at all.

    Both services are set to restart if they go down or email the team if not (no emails, used a powershell script for this).

    One thing is I am waiting for a number of Windows updates to be installed on the server, could this be causing this (I have seen some people have had this issue when patching needs to be done).

    Rebooting the server solves it temporarily.

    Any ideas are welcome. Thank you!

  • Kazmerelda - Tuesday, January 17, 2017 2:52 AM

    I have had a look at the logs and it does mention access is denied, this is the error from the logs:

    AutoRestart: Unable to restart the MSSQLSERVER service (reason: Access is denied)

    Did you verify that your accounts had all the proper windows permissions?

    SQL Server service needs:
    Log on as a service (SeServiceLogonRight)
    Replace a process-level token (SeAssignPrimaryTokenPrivilege)
    Bypass traverse checking (SeChangeNotifyPrivilege)
    Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
    Permission to start SQL Writer
    Permission to read the Event Log service
    Permission to read the Remote Procedure Call service

    SQL Server Agent needs:
    Log on as a service (SeServiceLogonRight)
    Replace a process-level token (SeAssignPrimaryTokenPrivilege)
    Bypass traverse checking (SeChangeNotifyPrivilege)
    Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)

    Without those perms, you might as well just turn off the server because it won't do what it needs to do for long. Also, verify that all your SQL stuff is only on the local server. If your instance needs access to NAS shares or other items outside the local server, then you need to be using windows domain accounts, not NT SERVICE accounts.

    And what do you mean by:

    One thing is I am waiting for a number of Windows updates to be installed on the server...

    Are these updates partially installed or in the process of being installed? Or are you just waiting to download them and install them?

    If the later, then that's not your issue. If the former, then it could definitely be causing a problem with your server. Make sure to get all installs completed with all necessary reboots done before trying to get SQL up and running again.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin - Tuesday, January 17, 2017 6:06 AM

    Kazmerelda - Tuesday, January 17, 2017 2:52 AM

    I have had a look at the logs and it does mention access is denied, this is the error from the logs:

    AutoRestart: Unable to restart the MSSQLSERVER service (reason: Access is denied)

    Did you verify that your accounts had all the proper windows permissions?

    SQL Server service needs:
    Log on as a service (SeServiceLogonRight)
    Replace a process-level token (SeAssignPrimaryTokenPrivilege)
    Bypass traverse checking (SeChangeNotifyPrivilege)
    Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
    Permission to start SQL Writer
    Permission to read the Event Log service
    Permission to read the Remote Procedure Call service

    SQL Server Agent needs:
    Log on as a service (SeServiceLogonRight)
    Replace a process-level token (SeAssignPrimaryTokenPrivilege)
    Bypass traverse checking (SeChangeNotifyPrivilege)
    Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)

    Without those perms, you might as well just turn off the server because it won't do what it needs to do for long. Also, verify that all your SQL stuff is only on the local server. If your instance needs access to NAS shares or other items outside the local server, then you need to be using windows domain accounts, not NT SERVICE accounts.

    And what do you mean by:

    One thing is I am waiting for a number of Windows updates to be installed on the server...

    Are these updates partially installed or in the process of being installed? Or are you just waiting to download them and install them?

    If the later, then that's not your issue. If the former, then it could definitely be causing a problem with your server. Make sure to get all installs completed with all necessary reboots done before trying to get SQL up and running again.

    Hi Brandie,

    Yep verified permissions, and nothing has changed on this sever. It's only in the last week that this has started happening, and we have changed nothing.

    I am chasing re the Win Updates being installed, it's done by another team.

    Thanks for the sanity check it was helpful!

  • Well, post again if the update thing doesn't resolve your issue. Also, remember to include anything you can from the SQL Logs (both Server & Agent) around the time of the random stoppage.

    Did you check the Event Viewer logs in Windows to verify there wasn't a stop command from someone or something else around these times?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply