Login failed for user 'DOMAIN\USERNAME$'

  • Hi,

    I'm a domain user and trying to connect to sql server programmatically using .net and unable to log onto the server, When i log in to that database using windows authentication it works, But when i try to connect from my data access latyer, it is throwing the error.. I've checked all the permissions in sql server everything is fine and are in place..

    Can anyone please help me out on this..

    Thanks,

  • DOMAIN\USERNAME$ is the machine, so does the machine have access to SQL? Also what are the machines services running as which connect to SQL? Local System? If so try changing the service to a domain account and grant that access to SQL.

  • Rather than the question of whether the machine has rights to sQL (which it probably shouldn't) is the question why your app is trying to connect as the machine's account. It's not impersonating or running as LocalSystem is it?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • We are not using SQL Authentication rather client asked us to connect using windows mode authentication as the database, our user accounts are in one domain (LDAP).. Everything is based on Active Directory only. I just cant change it to accept SQL Authentication, bcoz it is one of the client requirements..

    Thanks,

    Pavan

  • No one suggested using SQL authentication. The question is, why is the app connecting as the machine account, not the logged in user. Is it impersonating LocalSystem or something?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Do you have more details of the error; my guess without any further details would be that the data access layer requires kerberos delegation

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply