Unlock Microsoft SQL Server User Accounts Easily

  • Written By  

  • Updated on September 18th, 2023

Unable to connect to SQL Server, the SQL Server SA Account When It’s Locked Out. Then What to do? If you are not able to access SQL server then you might have to face this error “Login failed for user ‘sa’ because the account is currently locked out”. You can take the help of this blog to fix this type of error. As it contains all the correct manual techniques to unlock Microsoft SQL Server User Accounts. Just follow us!!

  Download     Buy Now

First of all, you should know the reason behind this error so that you can easily understand it. 

Reasons for “SQL Server account locked out” error-

The reason for locking the SA account after multiple failed login attempts is because the SQL Server login is configured to use password enforcement policy and account lockout is enabled after a number of failed login attempts.

Now, after knowing the reasons for its occurrence, move ahead to know the solutions to fix it.

How to Unlock SQL Server SA Account When It’s Locked Out?

There are various manual methods to Microsoft SQL server unlock SA account as given below:

Method 1: Unlocking the SA Account in Management Studio

If mixed-mode authentication is enabled in SQL Server, you can easily log in with Windows Authentication to SQL Server Management Studio and unlock any SQL Server user account. Follow the steps below:

  1. Initially, sign into SQL Server using Windows Authentication.
unlock sql server account

2. Then open the Security folder in Object Explorer>>open Logins folder. Press a right-click on SA account>> go to Properties.

 

3. Uncheck the box next to Login in the Login Properties window and hit OK.

unlock sql server account

Also Read: How To Resolve Recovery Pending State Error In SQL Server?

Method 2: Unlock SQL Server Account Using Command Prompt

  1. Hit Win+R and type cmd in the dialogue box. Press enter. Then the Command Prompt will appear.
  2. Then type this command “Osql –S ComputerName –E command”  and hit enter.
  3. After this, type command EXEC sp_password NULL, ‘NewPassword’, ‘sa’ and press enter.
  4. At last, type Go. Now, your password has changed, you can sign into your SQL Server by using the new password.

Method 3: Unlock Microsoft SQL Server User Accounts by Deleting Password Enforcement

  1. Make sure you are a member of the local admin group on the SQL server.
  2. Next, stop the service of SQL Server.
  3. Then through a command line, start SQL service in Single User Mode with the below command (-m defines Single User Mode):

net start mssqlserver\instance -m

4. Sign in to SQL Management Studio as a Local Administrator account. 

5. Now, for a ‘sa’ account, you have a single connection where you have to uncheck the status of ‘Account Locked’.

unlock sql server account

6. Now, you will be able to log out of the SQL Management Studio.

These are the manual methods used to fix a SQL server account locked out error. Using the above methods, there may be a chance of data loss that leads to more errors as well. So, to avoid these complications, we’ve come up with a better solution.

Method 4: An Alternate Solution

There is another best option to Unlock Microsoft SQL Server User Accounts by using SQL Server Password Remover utility. With this tool, you can quickly reset the password of your choice if you have lost or forgot it. Using this utility, your data will remain intact and it is a secured tool. 

Final Thoughts

We have mentioned the reasons for the “locked SA account” that you have to keep in mind. The manual and expert solution for accessing the SQL Server SA account is provided here. You can make a choice of any approach that best suits your situation.

Also Read: SQL Server page level corruption

About The Author:

Edwin Stark is a Technical Content Writer who specializes in writing about databases, e-mail recovery, and e-mail migration solutions. He loves researching and developing content that helps database administrators, organizations and novices to fix multiple problems.

Related Post

© Copyrights 2014-2024 EasyTechTools is an affiliate partner of SysInfoTools - All Rights Reserved