User rights for SQL Server service accounts (Group Policy)
Windows user rights to grant to SQL Server service accounts through Group Policy, with the accounts to add for each right.
SQL Server needs several Windows user rights for its service accounts. They are set with Group Policy under Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment. The table lists the accounts to add for each right.
User rights for the SQL Server service accounts
| User right | Accounts to add |
|---|---|
| Impersonate a client after authentication | NT AUTHORITY\SERVICE, NT AUTHORITY\NETWORK SERVICE, BUILTIN\Administrators, all SQL user service accounts and groups |
| Lock pages in memory | NT AUTHORITY\SERVICE, NT SERVICE\ALL SERVICES, NT AUTHORITY\NETWORK SERVICE, BUILTIN\Administrators, all SQL user service accounts and groups |
| Log on as a service | NT AUTHORITY\SERVICE, NT SERVICE\ALL SERVICES, NT AUTHORITY\NETWORK SERVICE, BUILTIN\Administrators, all SQL user service accounts and groups |
| Perform volume maintenance tasks | NT AUTHORITY\SERVICE, NT SERVICE\ALL SERVICES, NT AUTHORITY\NETWORK SERVICE, BUILTIN\Administrators, all SQL user service accounts and groups |
| SeSecurityPrivilege | NT AUTHORITY\SERVICE, NT SERVICE\ALL SERVICES, NT AUTHORITY\NETWORK SERVICE, BUILTIN\Administrators, all SQL user service accounts and groups |
Other settings in the same policy
These settings are not specific to SQL Server. They come from the same policy review.
- Print Spooler (PrintNightmare): Computer Configuration > Administrative Templates > Printers > "Allow Print Spooler to accept client connections" set to Disabled.
- Remote Desktop Session Host: Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections > "Turn off Fair Share CPU Scheduling" set to Enabled.
- Shutdown: Windows Settings > Security Settings > Local Policies > Security Options > "Shutdown: Clear virtual memory pagefile" set to Enabled.
Notes
- The original note contained a
fsutil sparse queryflagcommand with a file path placeholder, which is not related to these settings. It is not included. - The original note read "Locks pages on memory"; the right is named "Lock pages in memory" in the table.