2023-01-02

Service Account does Not have the required user right "Log on as a service"

Last week I encountered a problem in one of my client's production SQL Server. The SQL Server service cannot be started after changing the service account from NT Service\MSSQLSERVER to a domain user account. Below screenshot shows the error raised in SQL Server Configuration Manager:

It guided me to the Windows event log. In the System event log, we got below error:
The problem cause is the service account doesn't have the required user right "log on as a service". According to SQL Server BOL there are at least four permissions required by the SQL Server service account to run. Let's double check that is really missing in the Local Security Policy setting:
If your servers are in an active directory domain, mostly these permissions should be applied by group policy, so you better consult the domain administrator. But there is also a workaround, you can use the service.msc to change the service account, and the service.msc will help you to grant the "log on as a service" right to the new service account, as shown by below screenshot:
HAPPY NEW YEAR! :D

No comments:

Post a Comment