How to reset SQL SA Password – The Ultimate Guide

  • Written By  

  • Updated on July 3rd, 2023

Summary: Have you ever wondered if you forgot or lost your SQL Server password, then how can you log in to your SQL Server? Then, through this article, you will learn the top 04 solutions to reset SQL SA Password in MS SQL. This blog covers the step-by-step working of the manual as well as professional SQL Password Recovery to reset or recover the SQL SA password. Download Now   Purchase Now

A Brief Introduction to SQL SA Password in MS SQL

SQL SA, short for SQL system administrator, is a built-in administrator account with full control over the SQL Server instance. It is the most popular database system and was designed and developed to compete with the MYSQL database. A server-based application, SQL Server, is developed to run on a server, and users can create multiple accounts.

A system administrator (SA) account also serves as the highest-level administrator account. There are various situations when users forget or lose the SQL Server password of their user account; at that time, they can’t be able to login into SQL Server, but if users have access to the SA account, then by using a system administrator account, they can get access to their user account by setting the new password. But the main problem arises when users lose their SQL SA password. For this, manual and professional methods exist to reset SA Password SQL Server. 

04 Best Methods to Reset SQL SA Password in MS SQL

There are possibly the top 04 solutions for resetting the SQL SA password, i.e. 03 manual and 01 professional methods. But the manual method is not preferable as the interface is not understandable to non-technical users. So, we recommend changing the SQL SA password; you must use the SQL Password Recovery tool. Let’s discuss the manual methods first.

Method 01: Reset SA Password of SQL Server Manually

The first manual method is to Use the Single-User mode. But before using this method, make sure that the Microsoft SQL Server Management System is installed on your system. Follow the steps to change the SQL SA password:

  1. Firstly, open the command prompt in administrator mode.
  2. Now, you have to type the command net stop MSSQLSERVER to stop the running SQL Instance, it will stop the SQL services that are running currently.
  3. Then, restart the SQL Server in Single-User mode, for this, you have to type the command net start MSSQLSERVER /m”SQLCMD” and hit the Enter button. If nothing comes on screen, that means your SQL Server restarts. Rather, you will see this – The SQL Server <MSSQLSERVER> service was started successfully.
  4. After that, you run the command sqlcmd and press the Enter button, so that you are connected to the SQL Server. By doing this, your command line will be open. Note: If you want to define any particular SQL instance, then you need to use appropriate SQLCMD switches such as sqlcmd -SServerName\InstanceName.
  5. Now, you have to create a new user and password with the T-SQL (Transact-SQL) commands. Type the command CREATE LOGIN name WITH PASSWORD=’password’. Here, the name indicates the account name, and the “password” indicates the new password. Then, type the GO command because you are directly using the T-SQL commands, and press Enter button.
  6. By using the T-SQL commands, you have to add this newly created user to the System Administrator role. For that, you have to type the command SP_ADDSRVROLEMEMBER name,’SYSADMIN’. Note: Here, “name” indicates the account name, and then type the command GO and press Enter
  7. Then, by typing the exit command, you can exit the SQLCMD command line and then, hit the Enter button. Now, you have to type the command net stop MSSQLSERVER && net start MSSQLSERVER to restart the SQL Server in regular mode. You can close the Command Prompt if the the message displays “The SQL Server <MSSQLSERVER> service was started successfully” on the screen.
  8. Now, by using SQL authentication, you can launch the Microsoft SQL Server Management Studio and log in as the new user that you created earlier, then click on Connect.
  9. In the Object Explorer section, you see the Security option, from which you have to go to Login. Now, the newly created and the SA account are present in the list. Right-click on the SA account, and then, select the Properties option from there.
  10. Now, enter a new password, and then Confirm the password by entering the same password again on the System Administrator Properties window. After that, click OK and close the properties window.
  11. Finally, your password for SA has been reset successfully.

Method 02: Use OSQL Utility to Change SA Password

OSQL is a command-line tool for SQL Server, which is present with 2000 and late versions. Following are the steps for using the OSQL utility method to reset the SQL SA password:\

  1. Firstly, open the command prompt in the administrator mode and list the SQL Server instances. Please note that the list of servers returned might differ for each of the invocations. This happens due to the OSQL utility not receiving the response from all the servers promptly just because of the broadcasting nature on networks. So you should try to execute it again if the command is not displaying on any server.
  2. After that, type the command “WIN_TVSNFL1C14U\MSSQLSERVER2017” -E -Q “exec sp_password NULL,’*****’,’sa’ ” which specifies an SQL Server instance for which you seek to reset the password. Now click on Enter button. Please note that you have to replace ***** with the new password that you want to reset. But you have to use a remote server name or IP address if there is a remote Microsoft SQL Server instance being used.

Method 03: Use Plesk Interface to Reset SQL SA Password

Are you familiar with Plesk? It is a web hosting platform with a control panel that allows the administrator to set up websites, and email accounts. If the Microsoft SQL Server instance has been registered in Plesk, then follow the steps shown below:

  1. Open the Plesk interface, then go to Tools & Settings where you have to choose Database Servers.
  2. On the Tools & Settings window for Database Servers, choose the Host name whose password you need to change or reset an SQL Server instance.
  3. After that, select the Change Password option.
  4. Now, you have to enter a New Password according to your choice and Confirm the password by entering the same password. Then click on OK to reset the password.

Method 04: Professional Method to Reset MSSQL SA Password

The professional solution to change the MSSQL SA password is effective because, in this method, we recommend you to use the most trusted and reliable software, Aryson SQL Password Recovery, which does not require more technical knowledge and the UI of this software is understandable. The tool is an easy-to-use application, and the demo version is also available. Following are the steps to change the password:

  1. Download, Install, and Run the Aryson SQL Password Recovery Tool.
  2. Click on the Browse button and choose the MDF file.
  3. After that, click on the Open button to explore the MDF file. This tool will auto-detect the version and the build version of the MDF file.
  4. Select the desired User name from the user list.
  5. Now, two options are available i.e. Remove Password or Change Password, click on the Change Password button to successfully unlock the password from the selected user name.
  6. Finally, your password is changed within a couple of seconds. Click OK and close the software application.

Conclusion

I hope this blog gives you all the information regarding the change of the MSSQL SA Password. Here, we discuss all the solutions, whether it is manual or professional, to reset the password and also discuss the working of the Aryson SQL Password Recovery tool.

Frequently Asked Questions

How to reset the SA password in SQL server 2019?

You can reset the SA password using the Aryson Password Recovery Tool. This tool provides the facility to change or reset the password of SQL Server SA. In addition, you can use the MDF file of any SQL Server version, like 2019, 2017, 2016, 2014, 2012, 2008 R2, 2008, 2005, and 2000.

How to reset the SQL Server SA password without login?

With the help of this recommended third-party solution, you can easily remove or reset the password of the SQL Server SA, and you won’t have to log in while performing the process.

About The Author:

Adom Smith is a DataRecoveryHelp Technology Writer. He is a technology enthusiast with over 3 years of experience in Data Recovery, IoT, Artificial Intelligence, and Robotics. He enjoys researching and sharing DIY solutions as well as tips and tricks for resolving Windows technical issues.

Realted Post

© Copyrights 2020-2024 by Data Recovery Help - All Rights Reserved