this is a common problem we will be facing in our test environment or in our test,personal and dev environment servers.

,  there are 3 steps to recover the lost password,

Step 1

Open the SQL Server Management Studio.  go to the security tab in the  server objects. click on logins  select the user you want to change the password.type the desired password in the password column, check the image attached

Step 2:

In Some environments you dont have SQL Server Management Studio Installed in the server then you can use osql to resolve the issue.check the image attached

Step 3:

If  you have forgot /removed the Windows Authentication then Start SQL Server in SIngle User mode by  changing the start up parameters with -m

Open the SQL Server Management Studio. and add the windows user and desired sql server logins . dont forget to change the SQL Server Start Up Parameters to -d,

One thought on “Forgot “sa” password

Leave a Reply

Your email address will not be published. Required fields are marked *