Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.