Table of Contents
Method 1: Using Command Promt or Powershell
1. Right click on Windows icon then open Windows Powershell(Admin).
2. Run this command to get the hostname of your SQL Server.
hostname
3. Run this command to connect to SQL server using single user mode. Replace servername by your SQL server hostname.
OSQL -S servername -E
4. Run this command to set a new password for the sa account.
EXEC sp_password NULL, 'NewPassword@', 'sa'
go
exit
5. Now, open SSMS then connect to the SQL server using new password.
Method 2: Using SSMS
You can reset or change the sa account password using SQL Management Studio if the Authentication Mode of your SQL server is Mixed Mode.
1. Let open SSMS then connect to the SQL server using Windows Authentication.
2. Right click on the sa account then select properties.
3. Type a new password for the sa account then save the changes.
5/5 - (1 vote)