4 Methods to Change SQL Server Password
Have you ever forgotten your SQL Server Password? Did you reinstall or change SQL Server Password by some ways at that time? I once forgot my SQL Server sa password and I reinstalled MS SQL at last as 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 due to the same reason, so I collect some methods to reset SQL Server Password for sa account.
Method 1: Change SQL Server 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:
- 1. Login into SQL server using Windows Authentication.
- 2. In Object Explorer, open Security folder, open Logins folder. Right Click on sa account and go to Properties.
- 3. Type a new SQL sa password, and confirm it. Click OK to finish.
After restarting SQL Server and all its services, you can log into SQL Server by sa login with new SQL sa password.
Method 2: Change SQL Password with Third Party Software
You aslo can get a third-party tool to change SQL password. MS SQL Server Password Unlocker is one of the good MS SQL password reset tools which can help you change SQL Server password in a few seconds. It allows you to change SQL Sa password on SQL Server and Express 2000/2005/2008.
Following is a guide for you to change Sa password with MS SQL Server Password Unlocker.
- Step 1. Download and install MS SQL Server Password Unlocker.
- Step 2. Click the Open button to import the file of master.mdf.
- Step 3. Select the SA account and then click Change Password button.
- Step 4. Enter your new password and click OK. Your SA password will be reset.
And then, all the user names of your MS SQL Server will be displayed. There are two kinds of MS SQL Server password will displayed on the table.
Unknown means you have a password for the user name, maybe you lost it.
Empty means you do not have a password for the user name, you can login the account without password.
Method 3: Use Command Prompt to Change SQL Server Password
- Step 1. Open a command prompt (Start -> Run -> cmd)
- Step 2. Type the follow commands, and press Enter after each line:
Osql CS yourservername CE
1> EXEC sp_password NULL, yourpassword, sa
- Step 1. Open SQL Server Management Studio
- Step 2. Open a new query
- Step 3. Type the follow commands and excute:
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE
Method 4: Change SQL Server Password with the Query Windows in Management Studio
Then the new password is set for your SQL Server sa account.
Well, the four solutions are the easy-to-use MS SQL Server Password Recovery ways.