Wednesday, July 16, 2014

SQL Server SA Account Locked Out, How to Unlock It?

"I just logged in to SQL Server 2008 with SQL Server Authentication mode but was stopped by the error message saying "Login failed for user 'sa' because the account is currently locked out. The System administrator can unlock it." What’s the root cause? How can I unlock my SA account? Anybody can help? Thanks in advance!"

To this problem, there are 2 possible causes to SA account locked out:

Cause 1: The SA account is enforced to use password policies.

Cause 2: The entered SA password is incorrect

2 solutions to SA account locked out:

Solution 1: Change sa login properties in SQL Server Management Studio
Solution 2: Reset SA account password

Solution 1: Unlock SA account in SQL Server Management Studio

Change SA account login properties in SQL Server Management Studio to unlock SA account.

Step 1: Run SQL Server Management Studio.

Step 2: In the Object Explorer, expand the root directory. Go to Security -> Logins.

Step 3: Double click on the sa user.

Step 4: Select General page. Enter a new password.

Step 5: Select Status page. Uncheck "Login is locked out". Then click OK.

Solution 2: Reset SA password to unlock SA account

Use Asunsoft SQL Password Geeker to quickly reset forgotten/lost SA password.

Step 1: Stop SQL Server services.

Step 2: Download, install and then launch Asunsoft SQL Password Geeker.

Step 3: Click on Open File button to import a master.mdf file which is generally located in D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf. ("D" is the disk where your SQL Server is installed.)

Step 4: Select the SA account and then click on Reset button.

Step 5: Type a new password then click OK.

The SA password will be changed successfully. Remember the new password and use it to unlock your SA account.

Note: Do not forgot start all SQL Server services before connecting to SQL Server.