Wednesday 5 June 2013

Login failed for user 'sa' because the account is currently locked out. The system administrator can unlock it.

Few days back i received a mail from one of our user saying that there "sa" login was locked out. This mail really surprised me and made me wander how come they have been using sa login in there application. Though i had to sort this issue as soon as possible because of its priority, I also decided to make sure, henceforth they are not using the "sa" login in their application which was taken care of .



Reason for such errors are as follows

  • Someone must have forced the "Enforce password policy" checked





Solution

  • Step 1
We need to use the below TSql command to unlock the sa account :
  1. ALTER LOGIN sa WITH PASSWORD = 'new_password' UNLOCK ;
The above step will unlock the "sa" account but wait its not done yet. The reason is we still have to uncheck the option "Enforce password policy" in the login properties otherwise we will surely receive another mail from the user regarding the same error.
  • Step 2
We need to uncheck the option from the "Enforce password policy"




After the above steps these types of errors can be handled.

No comments:

Post a Comment