Sunday, July 28, 2013

SQL SERVER – FIX : Error: 18486 Login failed for user ‘sa’ because the account is currently locked out.



msg: 18486
Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it.


Fix/Solution/Workaround:

1) Disable the policy on your system or on your domain level. However, this may not be the most appropriate option as it will adversely affect your security protection level.

2) If this is a one-time issue, enable “sa” login WITH changing password of “sa” login.

ALTER LOGIN sa WITH PASSWORD = 'yourpass' UNLOCK ;
GO

3) If this is a one-time issue, enable “sa” login WITHOUT changing password of “sa” login.

ALTER LOGIN sa WITH CHECK_POLICY = OFF;
ALTER LOGIN sa WITH CHECK_POLICY = ON;
GO

 For Eg:

ALTER LOGIN devuser WITH CHECK_POLICY = OFF;

ALTER LOGIN devuser WITH PASSWORD = 'Dev#123' UNLOCK ;

2 comments:

  1. how can i write alter command with out login

    ReplyDelete
    Replies
    1. Hi,

      Not yet tried, Pls chk below link,

      http://stackoverflow.com/questions/6468813/assign-a-login-to-a-user-created-without-login-sql-server

      Delete