SQL Server stores passwords as hash functions in the master.mdf file. While resetting passwords on Windows 10 might be straightforward, it's a different story with SQL Server. With SQL Server Password Changer, you can easily reset a lost SA password. However, accessing the master.mdf file is impossible while SQL Server is running. Therefore, the first thing you need to do is stop the SQL Server service before resetting the lost SA password on SQL Server.
Steps to Reset a Lost SA Password on SQL Server
Step 1: Stop the SQL Server Service
On the Start Menu, select All Programs =>Microsoft SQL Server =>Configuration Tools, then click SQL Server Configuration Manager.
In the SQL Server Configuration Manager window, expand the Services section, then click on SQL Server.
Click OK. The red exclamation mark on the server name icon and the toolbar indicates a successful server shutdown.
Step 2: Reset the SA Password
Download and install the SQL Server Password Changer program. Get the SQL Server Password Changer
Once the installation is complete, open the program. Click the Open File button.
The program will prompt you to select the master.mdf file for SQL Server. By default, the master.mdf file is located in the folder C:\Program Files\Microsoft SQL Server\MSSQL\Data. If you don't know the folder location, you can enter the master.mdf file name in the Windows Explorer Search box and search across system partitions.
After selecting the master.mdf file, the program decrypts the file and displays a list of database user accounts. Choose your SA account and click the Change Password button. Set a new password and click OK to successfully reset the lost SA password on SQL Server.
Above is the process to reset a lost SA password on SQL Server. Once you have a new password, the next step is to access SQL Server Configuration Manager, restart the SQL Server service, and log in with the SA account using the new password.
To gain a deeper understanding of SQL Server, readers can refer to the article Comparing Oracle and SQL Server, which will provide valuable insights.
