Login failed for user 'NT AUTHORITY\SYSTEM' in SQL EXPRESS 2005
I have developed the windows service & in windows service used the SQL server database .
when i will start the computer my windows service get started but it will not connect to the SQL server .it display the following message
"Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITY\SYSTEM'."
I want to start my service when my computer starting.
how to establish the connection to SQL server database from windows service ?
Re: Login failed for user 'NT AUTHORITY\SYSTEM' in SQL EXPRESS 2005
Your service is presumably using integrated security to connect to the database, but your service is running under a system account, not your account, which doesn't have access to your database. You have three choices:
1. Run the service under a user account that has access to SQL Server.
2. Grant the account the service is running under access to SQL Server.
3. Add a login/user to SQL Server and use that account to connect from the service.