Yesterday, I was working on my office laptop with SQL Server which was installed previous day only, when all of a sudden I received message of machine getting restart due to scheduled maintenance. After system reboot, SQL Server did not start automatically. I checked SQL Server Configuration Manager. SQL Server services were OFF. I received below error when tried to turn ON the services:-
The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details.
Digging further in event logs under Windows Logs > System, it had below message:-
Log on as a service policy determines which service accounts are prevented from registering a process as a service. Some policy update from my employer must have removed the sql service account from this policy.
Now, we have 2 resolution for above case. First, we can edit Local Security Policy and provide SQL Server service account [NT Service\MSSQLSERVER] with Log on as a service rights. But being office laptop, I am restricted from making any changes in Security policies. So we have to go with second solution.
Second solution is to change the sql server service account to [LocalSystem] from SQL Server Configuration Manager.
Once above changes made SQL Service started without any issue. Happy Coding 🙂