Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Reset Sa Password in SQL Server

Learn how to reset sa password in SQL server with clear steps, practical context, and useful troubleshooting guidance.

Table of Contents

This updated guide examines How to Reset Sa Password in SQL Server and organizes the essential facts, background, and practical takeaways in clear American English.

Responsible-use note: Apply security techniques only to systems you own or are explicitly authorized to test.

Method 1

Using Windows Authentication

  1. How to Reset Sa Password in SQL Server — contextual image 1 Understand how this method works. If Windows Authentication is enabled for your server, you can use it to log into your server without having to enter a password. After you're logged in, you can easily change the SQL server's password.[1]XResearch source
    • If Windows Authentication isn't enabled, you'll need to either use Single-User Mode or use Command Prompt to reset your password.
  2. How to Reset Sa Password in SQL Server — contextual image 2 Make sure that SSMS is installed. SSMS is a user interface which allows you to change different aspects of your SQL Server settings in a window rather than in Command Prompt. If you don't have SSMS installed, do the following:
    • Go to the SSMS installation page in a browser.
    • Click the Download SQL Server Management Studio 17.6 link.
    • Double-click the downloaded SSMS setup file.
    • Follow the on-screen prompts to install SSMS.
  3. How to Reset Sa Password in SQL Server — contextual image 3 Open SSMS. Typesql server management studiointo Start, then click Microsoft SQL Server Management Studio 17 at the top of the Start window.
  4. How to Reset Sa Password in SQL Server — contextual image 4 Select the correct authentication. Click the "Authentication" drop-down box, then click Windows Authentication in the menu.
  5. How to Reset Sa Password in SQL Server — contextual image 5 ClickConnect. It's at the bottom of the window. If Windows Authentication is allowed for your account, doing so will log you into your server's dashboard.
  6. How to Reset Sa Password in SQL Server — contextual image 6 Expand your server's folder. If your server's folder in the upper-left side of the window doesn't have several options below it, click the ? icon to the left of it to expand it.
  7. How to Reset Sa Password in SQL Server — contextual image 7 Expand the "Security" folder. It's below the server's name.
  8. How to Reset Sa Password in SQL Server — contextual image 8 Expand the "Logins" folder. You'll find this in the group of options below the "Security" folder.
  9. How to Reset Sa Password in SQL Server — contextual image 9 Double-clicksa. It's in the "Logins" group of options. Doing so opens your System Administrator properties window.
  10. How to Reset Sa Password in SQL Server — contextual image 10 Enter a new password. Type your new password into both the "Password" and the "Confirm password" text fields near the top of the window.
  11. How to Reset Sa Password in SQL Server — contextual image 11 ClickOK. It's at the bottom of the window. Doing so will change your password and close the properties window.

Method 2

Using Single-User Mode

  1. How to Reset Sa Password in SQL Server — contextual image 12 Understand how this method works. Even if you've locked out your only account, you can add a user and give them administrator permissions by using the Command Prompt. After doing this, you can use the new user's credentials to log into your SQL Server page, from which point you can change the SA password.[2]XResearch source
  2. How to Reset Sa Password in SQL Server — contextual image 13 Make sure that SSMS is installed. SSMS is a user interface which allows you to change different aspects of your SQL Server settings in a window rather than in Command Prompt. If you don't have SSMS installed, do the following:
    • Go to the SSMS installation page in a browser.
    • Click the Download SQL Server Management Studio 17.6 link.
    • Double-click the downloaded SSMS setup file.
    • Follow the on-screen prompts to install SSMS.
  3. How to Reset Sa Password in SQL Server — contextual image 14 Open Command Prompt in administrator mode. Open Start How to Reset Sa Password in SQL Server — contextual image 15, then do the following:
    • Type incommand prompt
    • Right-clickHow to Reset Sa Password in SQL Server — contextual image 16 Command Prompt
    • Click Run as administrator
    • Click Yes when prompted.
  4. How to Reset Sa Password in SQL Server — contextual image 17 Stop SQL Instance from running. Type innet stop MSSQLSERVERand press?Enter. This will stop the currently running SQL services.
  5. How to Reset Sa Password in SQL Server — contextual image 18 Restart SQL in Single-User Mode. Type innet start MSSQLSERVER -m"SQLCMD"and press?Enter.
    • You won't see any indication that you're running in Single-User Mode at this point, but you should see the phrase "The SQL Server service was started successfully" appear.
  6. How to Reset Sa Password in SQL Server — contextual image 19 Connect to SQL. Type insqlcmdand press?Enter. Doing so opens the SQL command line.
  7. How to Reset Sa Password in SQL Server — contextual image 20 Create a new user and password. You'll do this with typed commands in the SQL command line:
    • Type inCREATE LOGIN name WITH PASSWORD='password'where "name" is the account name and "password" is the new password.
    • Press?Enter.
    • Type inGOand press?Enter.
  8. How to Reset Sa Password in SQL Server — contextual image 21 Add the user to the System Administrator role. Type inSP_ADDSRVROLEMEMBER name,'SYSADMIN'where "name" is the account name, press?Enter, and then type inGOand press?Enter.
  9. How to Reset Sa Password in SQL Server — contextual image 22 Exit the SQLCMD command line. Type inexitand press?Enter.
  10. How to Reset Sa Password in SQL Server — contextual image 23 Restart SQL in regular mode. You can cancel Single-User Mode by typing innet stop MSSQLSERVER && net start MSSQLSERVERand pressing?Enter.
    • You should see the "The SQL Server service was started successfully" phrase appear again; at this point, you can close Command Prompt.
  11. How to Reset Sa Password in SQL Server — contextual image 24 Open SSMS. Typesql server management studiointo Start, then click Microsoft SQL Server Management Studio 17 at the top of the Start window.
  12. How to Reset Sa Password in SQL Server — contextual image 25 Select the correct authentication. Click the "Authentication" drop-down box, then click SQL Server Authentication in the menu.
  13. How to Reset Sa Password in SQL Server — contextual image 26 Log in with the new user's credentials. Click the "Login" drop-down box, then click the name of the user you just created.
  14. How to Reset Sa Password in SQL Server — contextual image 27 Enter the password. Type the user's password into the "Password" text box near the bottom of the window.
  15. How to Reset Sa Password in SQL Server — contextual image 28 ClickConnect. It's at the bottom of the window. As long as you adequately entered your username and password, this will open your server's dashboard.
  16. How to Reset Sa Password in SQL Server — contextual image 29 Expand your server's folder. If your server's folder in the upper-left side of the window doesn't have several options below it, click the ? icon to the left of it to expand it.
  17. How to Reset Sa Password in SQL Server — contextual image 30 Expand the "Security" folder. It's below the server's name.
  18. How to Reset Sa Password in SQL Server — contextual image 31 Expand the "Logins" folder. You'll find this in the group of options below the "Security" folder.
  19. How to Reset Sa Password in SQL Server — contextual image 32 Double-clicksa. It's in the "Logins" group of options. Doing so opens your System Administrator properties window.
  20. How to Reset Sa Password in SQL Server — contextual image 33 Enter a new password. Type your new password into both the "Password" and the "Confirm password" text fields near the top of the window.
  21. How to Reset Sa Password in SQL Server — contextual image 34 ClickOK. It's at the bottom of the window. Doing so will change your password and close the properties window.

Method 3

Using Command Prompt

  1. How to Reset Sa Password in SQL Server — contextual image 35 Open StartHow to Reset Sa Password in SQL Server — contextual image 36. Click the Windows logo in the bottom-left corner of the screen. This will open the Start menu.
  2. How to Reset Sa Password in SQL Server — contextual image 37 Search for Command Prompt. Type incommand prompt, then wait for Command Prompt to appear at the top of the Start menu.
  3. How to Reset Sa Password in SQL Server — contextual image 38 Right-clickHow to Reset Sa Password in SQL Server — contextual image 39Command Prompt. Doing so will prompt a drop-down menu.
  4. How to Reset Sa Password in SQL Server — contextual image 40 ClickRun as administrator. It's in the drop-down menu.
  5. How to Reset Sa Password in SQL Server — contextual image 41 ClickYeswhen prompted. This will confirm your decision to open Command Prompt in administrator mode. The Command Prompt window should open.
  6. How to Reset Sa Password in SQL Server — contextual image 42 Enter the first command. Type inosql -Land press?Enter.[3]XResearch source
  7. How to Reset Sa Password in SQL Server — contextual image 43 Enter the second command with your server's name. Type inOSQL -S server -Ewhere "server" is replaced by your server's name, then press?Enter.
  8. How to Reset Sa Password in SQL Server — contextual image 44 Create a new password. Type inEXEC sp_password NULL, 'password', 'sa'where "password" is replaced by the password that you want to use, then press?Enter.
    • For example, to set your password as "rutabaga123", you would typeEXEC sp_password NULL, 'rutabaga123', 'sa'into Command Prompt.
  9. How to Reset Sa Password in SQL Server — contextual image 45 Execute the command. Type inGO, then press?Enter. Typeexit, then press?Enterto exit OSQL.
  10. How to Reset Sa Password in SQL Server — contextual image 46 Attempt to log into SQL Server. Do so by using your administrator credentials and your new password. If you're able to log into SQL Server, your password was successfully changed.

FAQ

What is How to Reset Sa Password in SQL Server about?

It provides a structured overview of password, explains the main context, and highlights practical takeaways for readers.

Why does this topic matter?

Understanding the main concepts helps readers evaluate the issue, avoid common mistakes, and make better-informed decisions.

How should readers use this information?

Use the guidance as a practical starting point, confirm details that may have changed, and follow current product, safety, or security recommendations.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.