Tuesday, November 3, 2009

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Error:  Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Error clearly state that login is not associated with the trusted connection.

What is trusted connection and what is the advantage of it? Integrated authentication allows for SQL Server to leverage Windows NT authentication to validate SQL Server logon accounts. This allows the user to bypass the standard SQL Server logon process. With this approach, a network user can access a SQL Server database without supplying a separate logon identification or password because SQL Server obtains the user and password information from the Windows NT network security process.

Advantage of this process is that we don’t have to store credential with the connection string.

However sometimes you will see the error above error.

Resolution

  1. Change the authentication mode to mixed mode from SSMS or Enterprise Manager


ServerProperties

2. Check the user/login is associated with the appropriate SQL login

3. Host is in the same domain or Host machine is network, sometime rebooting of the host machine will resolve this issue.

2 comments:

  1. Difference between re-organize and re-building of indexes

    ReplyDelete
  2. I will post it as article shortly

    ReplyDelete