Introduction: How to Reset Lost SA Password on SQL Server

Forgot the SA password for SQL Server installed sometime ago? Former employee leaves the job without telling you the SQL Server password? I am sure that you're not the first person who has faced this issue. In this tutorial I'll show you how to reset lost SA password on any SQL Server instance, including SQL Server 2014, 2012 and 2008.

SQL Server stores the password as a hash in the master.mdf file. With SQL Server Password Changer you can quickly reset a lost SA password, instead of recovering the original password. However, the master.mdf file is inaccessible while SQL Server is running. SQL Server service needs to be shutdown before resetting the password offline.

Step 1: Stop SQL Server Service

On the Start menu, point to All Programs, point to Microsoft SQL Server, point to Configuration Tools, and then click SQL Server Configuration Manager.

In SQL Server Configuration Manager, expand Services, and then click SQL Server.

In the results pane, right-click the instance of SQL Server, and then click Stop.

Click OK. A red box on the icon next to the server name and on the toolbar indicates that the server stopped successfully.

Step 2: Reset SA Password

Download and install the SQL Server Password Changer program on your computer. After you've installed it, start the program.

Click on the "Open File" button. The program will prompt you to choose the master.mdf file for your SQL Server instance. By default, the master.mdf file is located in the directory C:\Program Files\Microsoft SQL Server\MSSQL\Data. If you don't know the folder location, you can use the Windows Explorer search bar and enter the file name master.mdf and search through your system partition.

Once you've chosen the master.mdf file, the program will decrypt it and then show you a list of database user accounts. Select your SA account and click on "Change Password" button. Set a new password and click OK.

Now you've successfully reset a lost SA password. Go to the SQL Server Configuration Manager and start you SQL Server service again. You can then login to your SA account with your new password.

That's it!

Comments

author
marcowilliam (author)2016-08-01

SQL
Password Recovery and Reset can assist you reset SQL password or other user
passwords for Microsoft SQL Server 2000, 2005 and 2008 database regardless of
length and difficulty of the password.

author
xobtqk223746 (author)2016-06-17

Have you forgotten your SQL server password and cannot login it? Don’t worry! SQL Password Rescuer can help you reset and other user passwords of Microsoft SQL Server.

Guide: how to recover password from SQL

author
SaiP31 (author)2015-10-20

Hi,

No need of any 3rd party software to change sa password incase you forgot.

Just open SQL Server, login using Windows Authentication Mode instead of Sql Server Authentication which needs sa password.

After logged in through Windows Authentication Mode,
go to Security folder on the left hand side pane,
then open logins folder now find sa account and right click - click properties

Now on the right hand side you will see sa account properties which shows you encrypted password, just change it to whatever you want and click on OK

Thats all

author
JamesW265 (author)SaiP312016-03-31

Absolute legend. Didn't want to have to install 3rd party software and you just got me right out of a jam. Thank you so much!

author
OlgaS (author)2014-11-20

Thumbs up for above information! Can we reset password of SA account through sqlcmd? Over the internet i read - nalavadebela.wordpress.com/2014/04/14/sql-server-password-recovery , it was also quite helpful but in this you have also added the information to stop SQL Server .

author
watkinsbob (author)2014-04-29

It seems that SQL Server Password Changer can also unlock the sa account that is locked out. After resetting the password with that program, I can now login to my sa account. Thank you very much!

author
pehinch (author)watkinsbob2014-04-30

It's correct! While resetting the password, the program will also uncheck the following options and enable your account if it is disabled:

"Enforce password policy"

"Enforce password expiration"

"Login is locked out"