Results 1 to 2 of 2

Thread: Login failed for user 'NT AUTHORITY\SYSTEM' in SQL EXPRESS 2005

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    5

    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 ?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width