SQL login is locked out – how to check status with T-SQL

23 September,2013 by Jack Vamvas

An application owner reported a SQL Server login account locked out during an upgrade.  He’d attempted a number of login attempts , all with the incorrect password.

When  a SQL Server login is configured to use password policy enforcement and the server policy is set for  account lockout after a certain number of failed logins, it is possible to lock out the SQL Server login .

To check the locked status of a  SQL Server login  use this query




To unlock the login account –


ALTER LOGIN logon_acct WITH PASSWORD = 'a_password' UNLOCK

 Read More

 SQL Server Security Policy - SQL Server DBA

SQL Server - Database Server Security Audit Process - SQL Server ...

How to create a SQL Server Security Audit - SQL Server DBA

Database Security Countermeasures against hacker attacks - SQL ...

Author: Jack Vamvas (http://www.sqlserver-dba.com)


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on SQL login is locked out – how to check status with T-SQL

sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer