How to Reset Lost SA Password on SQL Server




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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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!

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    7 Discussions


    3 months ago

    I was a little skeptical at first thinking it was a scam but its a legitimate product that does the job well. I accidentally disabled my window authentication account and so I was locked out. I bought the mentioned product above and it worked like a charm. Wish I would of done this in the first place.


    3 years ago

    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.


    3 years ago

    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


    4 years ago


    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


    Reply 3 years ago

    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!


    5 years ago on Introduction

    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!


    Reply 5 years ago on Introduction

    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"