This question already has an answer here:

We receive an error Login failed for user 'x' sometimes from our application. We are 100 % sure the login is working because we checked it by manual login from SSMS as well as from the application. The error happens sometimes only. How can we find the exact reason for the failure? Why does it fail only sometimes? Below is the whole stack trace:

Exception Type : System.Data.SqlClient.SqlException
Message : Login failed for user 'x'.
Source : .Net SqlClient Data Provider

marked as duplicate by Paul White says GoFundMonica sql-server Dec 30 '14 at 13:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • We have checked SQL Server logs, but did not find failed login attempt there. – Paresh Dec 30 '14 at 13:45
  • 1
    See Troubleshooting Error 18456 especially state 16. – Paul White says GoFundMonica Dec 30 '14 at 13:51
  • If you can't find the failed login attempt in the SQL Server log, then I suspect that when it fails you are trying to connect to the wrong server (or you're simply not looking at the right instance). How is your connection string initialized? Have you done any debugging in the application to reproduce the problem? – Aaron Bertrand Dec 30 '14 at 14:40
  • It does not reproduce every time. only sometime we received a such error from email which i mentioned – Paresh Dec 31 '14 at 7:16