Have you ever forgot or lost your SQL Server sa password? Did you hava any ideals to reset your lost sa password? Or choosed to reinstall MS SQL Server on your PC again? I once forgot my SQL sa password and I reinstalled SQL Server at last, because I failed to find some good methods to solve the problem. What annoying and terrible experience it is! In order to avoid reinstalling SQL Server for a second time, i collect some methods and try them by myself, to reset SQL Server Password for sa account.

Method 1: Reset SQL Server sa password by Windows Authentication

If Builtin/Administrator is present in SQL Server, you can login with an ID which is member of Administrators group and reset sa password in SQL Server. Just do as follows:

Step 1. Login into SQL server using Windows Authentication.
Step 2. In Object Explorer, open Security folder, open Logins folder. Right Click on sa account and go to Properties.
Step 3. Type a new SQL sa password, and confirm it. Click OK to finish.

This way is easilily to reset the sql server sa or other account password, but you need to have the valid Builtin/Administrator account.

And here is another way that maybe also could reset ours lost sa password, but i have problems to verify this way, can somebody give some ideas about the method.

Method 2: Use the Query Windows in Management Studio to reset sql sa password

Step 1. Open SQL Server Management Studio
Step 2. Open a new query
Step 3. Type the follow commands and excute:

      USE [master]

The NewPassword is set for your SQL Server sa account.

Use command prompt is also an easy way to reset lost sa password. See the commands below:

Method 3: Use Command Prompt to reset your lost SQL sa password

Osql -S yourservername -E
      1> EXEC sp_password NULL, 'yourpassword', 'sa'
      2> GO

Of course, you can reset your other account password, just by changing the 'sa' to your another sql account name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.