How to Reset SA Password in SQL Server? Know the Correct Procedure
Forgot your SA password? Look no further! This blog post discusses how to reset SA password in SQL Server. To accomplish the task, we will share and explain different manual methods such as using Single User mode, using OSQL utility, and using Plesk interface. In addition to that, we will share an automated utility backed by countless technical experts. So without further ado, let’s get started with the blog and see which method best fits your requirements and solves your issue proficiently.
SQL Server is one of the most popular database management systems to date. It provides a multitude of features that users don’t get it any other database management systems. The server allows you to create multiple user accounts. Naturally, each user account has its own credentials i.e., username and password.
Unfortunately, users sometimes forget or lose their SA or User passwords which creates a huge problem for them as it locks them out of their account in SQL Server. Therefore, we have drafted this technical writeup to help to change or reset your SA password in SQL Server so you are not locked out from accessing your precious data.
Table of Content
In the following article, we have shared and explained the top 5 solutions (both manual and automated) we have gathered from the depths of the internet. All of these solutions are top-rated by users as these are the most commonly used solutions. So, without wasting any further time, let us move further and have a look at them.
Ways to Reset & Change SA Password in SQL Server?
- Use the SSMS [SQL Server Management Studio]
- Reset SA Password in SQL Server Without SSMS
- Use the Single User Interface
- Use the OSQL Utility
- Use the Plesk Interface
So these are the top five solutions that we gathered from all over the internet. Now let us explain the working of each one of them so you can decide which method seems the most fitting to your requirements.
Reset Password Using SQL Server Management Studio
For this manual approach, you must be an SQL Server administrative and then, you can use this method to unlock the database account. Here is how to execute the technique.
- Launch SSMS (SQL Server Management Studio) and click on the Connect button.
- Head to “Object Explorer”. Then, expand “Security” and proceed to expand “Logins”.
- Now, choose the account whose password you wish to change and then right-click on it and select “Properties” from the dropdown menu.
- In the Properties window, change the password to your preferred, confirm by entering it again, and lastly, click OK.
How to Change SQL Server Password without SSMS Dependency?
If you want to accomplish the task without depending on SSMS, worry not! This segment contains an expert-recommended solution that will help you execute the task in a smooth-sailing manner. The expert-favorite SQL Password Recovery Software is deemed the smartest way to unlock SA and user password in SQL Server in a proficient manner.
The utility is loaded with the best features that are not found in any other solution available on the internet. It is also completely free from SQL Server dependency i.e., you do not need a live SQL Server environment to accomplish the password reset with this tool. In addition to that, it is capable of recovering even multilingual passwords of MDF files successfully. The utility can also help users recover the login password of the Offline master MDF file as well. Check out the following segment to see the working of the utility in changing SA password.
Steps to Reset SA Password in SQL Server with the Automated Tool
- Download and set up the software on your system and then Open it.
- Click the Browse button to upload the master.mdf file to the tool.
- Once the software scans the uploaded data, all the Login account names will display on the interface.
- Next, in the Password Setting window, set a new password of your choice.
And you are done with the quick and hassle-free tutorial on how to reset SA password in SQL Server with an automated utility backed by countless experts.
Benefits of Opting for the Professional Utility
As mentioned above, there are several benefits and advantages one gets when one chooses to go for the expert recommendation. We have mentioned some of the most prominent ones in this segment.
- The tool is proficient in its job i.e., recovering and resetting SA passwords in SQL Server.
- It can also recover passwords in an offline Master MDF File in a smooth and efficient manner.
- It resets both SA as well as individual user passwords from SQL MDF files.
- The tool also provides the facility to set a new password for user login within the software.
- It supports all SQL versions including the latest SQL Server 2022 and its previous versions as well.
- You can download and launch this tool on any Windows OS system without facing any compatibility problems.
Now that we know the workflow and benefits of the expert utility, let us move on and see the other manual methods you can opt for to reset SA password in SQL Server.
If you have to recover database objects in SQL Server then you can opt for the SQL Database Recovery Software.
Using Single User Interface to Reset SQL Server SA Password
To use this solution & change SA password SQL Server, ensure that you have MS SQL Server Management System installed on your system. Below are the instructions to follow this method.
- In the Administrator Mode, open the Command Prompt.
- There, to stop the SQL Instance from running, type the command net stop MSSQLSERVER and click Enter.
- Doing so, the running SQL services will be stop currently.
- Next, restart the SQL Server in the single-user mode. For that, type in the command net start MSSQLSERVER /m“SQLCMD” and then click Enter.
It is fine if you do not see anything instantly after that. It is not unusual to not see any indication when you are connected in single-user mode. Moreover, instead of an indication, you will see – The SQL Server service was started successfully.
- Once done, connect to the SQL Server by typing in the command sqlcmd and hitting the Enter button. This will open the SQL command line. Keep in mind that you need to use the appropriate SQLCMD Switches if you want to specify any particular SQL Instance. For example: sqlcmd – SServerName\InstanceName.
- Afterward, create a new user password using the T-SQL (Transact SQL) commands. Type in the command CREATE LOGIN name WITH PASSWORD=’password’. In the command, the “name” denotes the account name, and the “password” denotes the new password. Since you are directly using the T-SQL commands, use the “GO” command as well. Then, hit Enter.
- Upon doing so, add the newly created administrator to the System Administrator role using more T-SQL commands. Enter the command SP_ADDSRVRROLEMEMBER name’SYSADMIN’. After that, type the “GO” command and click Enter.
Note: Here, the “name” denotes the account name.
- Now, type the command exit to exit the SQLCMD command line and then, click Enter. Along with that, restart the SQL Server in the regular mode. For that, type the command net stop MSSQLSRVER and then net start MSSQLSERVER and click Enter to simultaneously cancel the Single-User mode. Close the Command Prompt when you see the message “The SQL Server service was started successfully”.
- Afterward, using the SQL authentication, launch the MS SQL Server Management Studio and log in as the new user that you created earlier. Click on the Connect button.
- Now, click Security > Logins under the Object Explorer section. There, you will see your newly created account in the list. The SA account will be listed there as well; right-click on it and choose “Properties”.
- In the System Administrator Properties Window, enter a new password, then enter it again to confirm it. At last, click OK to close the window.
Using OSQL Utility to Reset SA Password in SQL Server
The OSQL Utility is a command line tool for SQL Server available for 2000 and later versions. Here is how to change SA password using the OSQL Utility.
- First and foremost, in the Administrator Mode, open the Command Prompt. Then, list the SQL Server Instances.
Note: Because of the broadcasting nature of the networks, the OSQL Utility may not receive a response from the servers in a timely manner. Consequently, the list of servers might result different for each invocation.
- Thus, try to execute again if the command is not displaying over any server.
- Next, type a command specifying an SQL Server instance for which you wish to reset or change the password.
- Upon doing so, click Enter.
Note: replace ******* with the new password of your choice.
Note: You need to use the remote server name or IP address if there is a remote MS SQL Server instance is being used.
Using Plesk Interface to Change SQL Password
Plesk, as we know, is a commercial web hosting platform with a control panel. With its help server admins set up websites reseller accounts, email accounts, and DNS entries in a web-based interface. If your MS SQL Server is registered in Plesk, follow the instructions given below to accomplish the task.
- On Plesk Interface, head to Tools & Settings >> Database Servers.
- On the Tools & Settings window for Database Servers, click on the hostname of the SQL Server instance of which you want to change the password.
- Click on “Change Password”.
- Then, enter a new password and re-enter it to confirm. At last, click OK to save the changes you made.
Now, as we mentioned above, there are certain limitations associated with the manual approaches. We have mentioned the hindrances in the following segment. Let’s have a look at them.
Drawbacks of the Manual Solutions
- All the manual solutions are extremely lengthy as they involve a lot of steps. This makes it tiring and cumbersome for users to execute.
- These methods are technically complicated to understand and execute, thus, novice users mostly avoid these approaches.
- The procedures require users to have appropriate technical insight in order to execute them properly. If not, one may make errors and may even face data loss.
So as you see the limitations make the manual procedures quite an unappealing choice for users. To overcome this, technical professionals recommend that users go with the above-mentioned expert utility to ensure a smooth and reliable process to change or reset SA password.
So There You Have It
In this article, we discussed the top 5 methods you can opt for to reset SA password in SQL Server in a smooth and proficient manner. Most methods are a manual approach to accomplishing the task. As we know the solutions are manual in nature, and it gets quite complicated for most users to comprehend and execute the procedure without any expert supervision. Therefore, to change SA password in a secure and hassle-free manner, technical professionals recommend users go for the above-mentioned utility.
Read More: How to Repair SQL Server Database?
Q-1. Is this automated solution free to change SA password SQL Server database?
Ans: No, this is not free but it offers a free demo version for users to test it.
Q-2. Do experts suggest the automated solution?
Ans: Yes, in fact experts & SQL MVPs suggest users to avoid the manual solution as it is hectic. Evidently, they suggest users to opt for the automated method.
Q-3. Does this Tool repair SQL corrupted objects?
Ans: No, for this users need to opt for the SQL Recovery tool
Q-4. What’s the procedure to change my SA login name in SQL Server?
Ans: Follow the below steps carefully to change SA login name:
- Launch SSMS >> Open SQL Server Folder >> Go to Security tab.
- Now, Right Click Login >> Select the New Login option to proceed.
- Select Login Name of your Service >> Select User mapping Page.