title: Getting account 'locked' status in SQL Server
body: <p>I want to unlock one account in SQL Server. Before unlocking I have to check whether that account is locked or not. </p>
  
  <p>I want to unlock only if the account is locked. </p>
  
  <p>Is there any SQL query or stored procedure to get the "Locked" status of SQL user?</p>