Thursday, June 3, 2010

[28000] [Microsoft][SQL Native Client][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Error:
DIAG [28000] [Microsoft][SQL Native Client][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (18452) 
DIAG [08S01] [Microsoft][SQL Native Client]TCP Provider: An existing connection was forcibly closed by the remote host.(10054)
DIAG [08S01] [Microsoft][SQL Native Client]Communication link failure (10054)


The above error will generally occur when the 'server authentiction' is set to "Windows Authentication mode'.This means one can login to Sql Server with Windows NT authentication using the network login ID only and not using a logID and password entered by the user.
But the above error can occur even when the 'server authentiction' set to "SQL Server and Windows Authentication mode".One possibilty is when database user is null/empty.
I intentionally passed null(\0) in userID and got the above error in the ODBC trace log.

Related: Collecting or enabling ODBC trace

No comments: