SQL Server: Reset SA Password
The Problem
Many of us we had time that we forgot the SA account password, or was locked out.
Below we can found an easy explanation on how to reset the sa account password.
Before doing anything first, we need to Download the PsExec tool from the Sysinternals suite.
Solve the problem
Open with elevated privileges CMD or Powershell and run the following command
CMD Command:
C:\PsExec.exe -s -i "C:\Program Files (x86)\Microsoft SQL Server\140\Tool\Binn\ManagementStudio\Ssms.exe"
PowerShell Command:
.\PsExec.exe -s -i "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe"
SQL Server Management Studio will start with a system account. In the Username field we will observe the user "NT AUTHORITY \ SYSTEM"