1. Home
  2. Technology
  3. Microsoft SQL Server
  4. How To Unlock Microsoft SQL Server SA Account

How To Unlock Microsoft SQL Server SA Account

There may be times when using Microsoft SQLServer where you have had multiple failed login attempts and have consequently locked the account within SQL. If other accounts are not setup accordingly, you may be put into a helpess position where a Windows NT or local SQL account does not have the priviliges necessary to unlock or edit any changes to the ‘sa’ user. In these circumstances you may follow the following procedure to succesfully unlock the ‘sa’ account, so you can login again.

Step 1) On the SQL server, make sure you are a member of the local admin group

Step 2) Stop the SQL Server service

Step 3) Start SQL service via Command Line in Single User Mode with the following command (-m specifies Single User Mode)

net start mssqlserver\instance -m

Step 4) Login to SQL Management Studio as a Local Administrator account. You will now have a single connection into SQL where you can uncheck the ‘Account Locked’ status for the ‘sa’ account.

Step 5) You should now be able to log out of SQL Management Studio and log back in as your SA account to make any further administrator type changes.

Updated on March 30, 2020

Was this article helpful?

Related Articles