How to reset lost SA password on SQL Server

Suppose you have installed SQL Server for a while, and forgot the SA password. Even long-time users may encounter this situation. The following article will guide you how to reset the lost SA password on SQL Server, including SQL Server 2014, 2012 and 2008.

SQL Server Store the password as a hash in the master.mdf file. If resetting passwords on Windows 10 is fairly easy, SQL Server is different. If you have SQL Server Password Changer you can easily reset the lost SA password. However, the master.mdf file cannot be accessed while SQL Server is running. So what you need to do first is to stop the SQL Server service before resetting the lost SA password on SQL Server.

How to reset lost SA password on SQL Server

Step 1: Stop the SQL Server service

On Start Menu, click All Programs =>Microsoft SQL Server =>Configuration Tools then click Select SQL Server Configuration Manager.

On the SQL Server Configuration Manager window, expand Services section, then click SQL Server.

Click here OK, got it. The red box on the icon next to the server name and in the toolbar indicates a successful server stop.

how to reset password reset on sql server 2

Step 2: Reset the SA password

Download the SQL Server Password Changer program to your computer and install it. Download SQL Server Password Changer

After installation is complete, proceed to open the program. Click the button Open File.

The program will notify you to select the file master.mdf for SQL Server. By default, the file master.mdf located in the directory C: Program Files Microsoft SQL Server MSSQL Data. If you don’t know the location of the directory, you can enter the file name master.mdf in the Search Windows Explorer boxand search through system partitions.

how to reset password reset on sql server 3

After selecting the master.mdf file, the program will decrypt the file and show you a list of database user accounts. Select your SA account and then click the button Change Password. Set a new password and click OK, got it is that you have successfully reset the lost SA password on SQL Server.

Above is how to reset the lost SA password on SQL Server. Once you have a new password, the next step you need to do is to access SQL Server Configuration Manager and open the SQL Server service again, and log in the SA account with the new password.
To better understand SQL Server, readers can refer to the article Compare Oracle and SQL Server will bring a lot of useful knowledge for you.


Add a Comment

Your email address will not be published. Required fields are marked *