Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A custom service which runs as Local System on a Windows Server 2003 server needs to login to a database running on a local instance of SQL Server 2005. SQL Server services runs as Network Services, so actually database login is not allowed for NT AUTHORITY\SYSTEM. Please note that NT AUTHORITY\SYSTEM has already sysadmin Server role.

How do I grant database login permission to the NT AUTHORITY\SYSTEM user on a local SQL Server 2005 Express when it do not run as Local System?

share|improve this question

Your best option is to run the service as something other than Local System and explicitly grant the required SQL permissions to that service account.

Another (less desirable) option is to use SQL authentication from the service.

share|improve this answer
Changing the service user is an option and probably it should work but I am interested in understand why Local System can't login to databases also if it has sysadmin role and how to fix this – Danilo Brambilla Dec 14 '11 at 9:17
@danillo-brambilla Do you get any events in the application, security, or SQL logs when the service tries to authenticate? How does the service connect to SQL server (integrated auth, sql auth)? – JeffM Dec 14 '11 at 19:49

I've seen similar issues crop up, albeit not for SQL server.

Instead of granting the NT AUTHORITY\SYSTEM account access try using COMPUTERNAME$. Depending on how the service is running it is possible to see the user rendered in both fashions.

share|improve this answer
I'll have a try but I really do not like to set permissions to COMPUTERNAME$ – Danilo Brambilla Dec 14 '11 at 9:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.