SOLIDWORKS, Tech Tips, PDM

How to Change Your SQL SA Account Password

By Tom Young on December 28, 2020

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.

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.
    SA_password_change_01

  2. Log in as the SA user using SQL Server authentication and the current password.
    SA_password_change_02

  3. In the Object Explorer, expand Security and then Logins.
    SA_password_change_03

  4. Double click the SA login.
    SA_password_change_04

  5. Enter the desired password and confirm it.
    SA_password_change_05

  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_07

  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.
    SA_password_change_10

  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 Servername\InstanceName where “Servername” is the name of the server and “InstanceName” is the dedicated name.
    SA_password_change_11

  3. Start the SQL service in Single-User mode by typing: net start MSSQLSERVER /m”SQLCMD” and press Enter.
    SA_password_change_12

  4. Connect to the SQL server in the command prompt by typing: sqlcmd and press Enter.
    SA_password_change_13

  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_14

  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.
    SA_password_change_15

  7. Exit the SQLCMD by typing Exit and pressing the Enter button.
    SA_password_change_16

  8. Restart the SQL service in regular mode by typing: net stop MSSQLSERVER && net start MSSQLSERVER and press the Enter button.
    SA_password_change_17

  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)
    SA_password_change_18

  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.

Have you ever needed to change the password for SOLIDWORKS PDM? To modify the SOLIDWORKS PDM admin password you’ll need to follow a certain set of procedures, but it's pretty simple once you know where to look.

Read Article