How to Change Your SQL SA Account Password

Have you ever needed to change or even forgotten the password of the SQL Server System Administrator (SA) account? Maybe the password has been lost or the person in charge of keeping it left the company? In this article I will walk you through three most common ways to change the password and get you back into your SQL SA account.

The first method is to use the current SA password to log into the SQL Server Management Studio and change it. The second method is to use another administrator account to log into the SQL Server Management Studio to reset the password. The third method is to use a command prompt to restart the SQL service in a Single User Mode, reset the password, then restart the SQL service back in Multi-User mode.

Do you need SQL Server Help? TriMech provides Data Management Services for Microsoft SQL Installation, Configuration and Data Migration. View SQL Services »

Option 1: Using the existing SA password

  1. Open the SQL Server Management Studio. If you do not have this application, you can download it here – SQL Server Management Studio Download page.
    SQL Server Management Studio
  2. Log in as the SA user using SQL Server authentication and the current password.
    Login to SQL Server
  3. In the Object Explorer, expand Security and then Logins.
    Object Explorer
  4. Double click the SA login.
    Object Explorer - SA login
  5. Enter the desired password and confirm it.
    SA password change
  6. Click OK.

Option 2: Using a Windows Account with Administrative Permissions

  1. Open the SQL Server Management Studio.
  2. Follow all the same steps as you would in Option 1, but instead log in as the Windows user using Window Authentication.
    SA password change
  3. In the Object Explorer, expand Security and then Logins.
  4. Double click the SA login.
  5. Enter the desired password and confirm it.
  6. Click OK.

Option 3: Using the Local Administrator Account in Single-User Mode

  1. Open the Command Prompt as an administrator.
    Run as admin
  2. Stop the SQL Instance.
    If it is the default instance, type: net stop MSSQLSERVER and press the Enter button.
    If it is a named instance, type: net stop MSSQL$InstanceName where “InstanceName” is the dedicated name.

    Default Instance
    Stop SQL Sequence Named Instance
    Named Instance
  3. Start the SQL service in Single-User mode by typing: net start MSSQLSERVER /m”SQLCMD” and press Enter. Note: if using a names instance type: net start MSSQL$InstanceName/m”SQLCMD”
    SQL service in Single-User mode
  4. Connect to the SQL server in the command prompt by typing: sqlcmd and press Enter. Note: if using a named instance type: SQLCMD-S.InstanceName
    connect to SQL server
  5. Create a new user and password using T-SQL command. Type: Create LOGIN <name> WITH PASSWORD=’<password>’. Replace <name> with the desired username and <password> with the desired password. The single quotes are required. Type GO and press the Enter button.
    SA password change
  6. Verify the new user has System Administrator permissions by typing: SP_ADDSRVROLEMEMBER <name>,’SYSADMIN’. Replace <name> with the username entered in step 5. Type GO and press the Enter button.
    verify new user has system admin
  7. Exit the SQLCMD by typing Exit and pressing the Enter button.
    Exit SQLCMD
  8. Restart the SQL service in regular mode by typing: net stop MSSQLSERVER && net start MSSQLSERVER and press the Enter button. Note: if using a named instance type: net stop MSSQL$InstanceName && net start MSSQL$InstanceName
    restart SQL service
  9. Launch the SQL Server Management Studio application and login with the newly created user using SQL Authentication Mode (Similar to Option 1 and Option 2 above)
    SQL Server Management Studio
  10. In the Object Explorer, expand Security and then Logins.
  11. Double click the SA login.
  12. Enter the desired password and confirm it.
  13. Click OK.

Now that we’ve laid out the different options for resetting the SQL SA password, you can now choose which option works best when resetting your password so you can get back to work faster.

Do you need SQL Server Help? TriMech provides Data Management Services for Microsoft SQL Installation, Configuration and Data Migration. View SQL Services »

TriMech Marketing

TriMech provides thousands of engineering teams with staff augmentation and project engineering solutions that work hand-in-hand, from sketch to manufacturing.
Related Service

Ready to learn more?

Whether you need expert guidance, product support, or simply explore your options, our team is here to help.