2 Methods to Unlock SQL Server SA Account When It's Locked Out
Can't connect to SQL Server due to SA account locked out? If the SA account is locked down you may receive the error message "Login failed for user 'sa' because the account is currently locked out. The system administrator can unlock it. (Microsoft SQL Server, Error: 18486)."
When password policy is checked for a SQL Server login account, your account will get locked out after too many failed login attempts. In this article we'll show you 2 methods to unlock SQL Server SA account when it is locked out or disabled. The methods work with all versions including SQL Server 2014.
Option 1: Unlock SA Account in Management Studio
If the mixed mode authentication is enabled in SQL Server, you can log into SQL Server Management Studio with Windows Authentication, and then unlock any SQL Server user account easily.
- Login into SQL Server using Windows Authentication.
In Object Explorer, open Security folder, open Logins folder. Right click on SA account and go to Properties.
In the Login Properties window, uncheck the box beside Login is locked out and click OK.
Option 2: Unlock SA Account with SQL Server Password Changer
SQL Server Password Changer is a powerful recovery utility that can reset lost SQL Server password and unlock any locked-out or disabled user account. You do need to stop your SQL Server instance before following these steps to unlock SA account:
- Download SQL Server Password Changer on your local PC, install and launch it.
- Click the Open File button. Select the SQL Server master database file (master.mdf). Typically it is located in the folder: C:\Program Files\Microsoft SQL Server\MSSQL10\MSSQL\DATA.
The program will automatically decrypt the master database file and display all user accounts in your SQL Server. Select the SA account, click the Change Password button. Type a new password and click OK.
- The program will replace the existing password with your new password, and also unlock your SA account if it's already locked out or disabled.
- Start your SQL Server instance and you can then connect to SQL Server using the SA login.