How to Reset SQL Server sa password ?
I need to recover my SQL Server sa password . The situation is: I don't know the SA password and Windows Authenticated user is no longer active user (disable user because the user has left job) so I can not log in using Windows authentication. Is there anyway to reset the sa password, Windows authentication and to log in to the database? Last option could be uninstall and install again. In this case data will be lost. Thanks in advance Here are the steps to reset sql server sa password
Here are the steps to reset sql server sa password
- Open the SQL Server Configuration manager.
- Go to SQL Server Services and Stop the SQL Server Instance.
- Right click on SQL Server Instance and select the Properties option.
- Go to Startup Parameters tab, type –m to Specify a startup parameter and click on Add.
- Click on Apply and then OK.
Here is another workaround:
- Run the SQL Server Management Studio as the system account. This can be done easily with the PsExec program. Download PsExec from Sysinternals website. Extract the PsExec.exe program and save it to a folder on your computer such as C:.
- Open an elevated Command Prompt and run the following command:
- C:PsExec.exe -s -i "C:Program Files (x86)Microsoft SQL ServerHToolBinnManagementStudioSsms.exe"
- It will start SQL Server Management Studio as the system account. You’ll see that the username is shown as "NT AUTHORITYSYSTEM". Simply choose the Windows Authentication mode and click on the Connect button.
- Once you connect, you can reset SA password with ease.
- If this also doesn't work, the last resort is try some third-party software such as SQL Server Password Changer, or reinstall your SQL Server.