The Problem
You have lost or forgotten the SA password for you SQL Server box!!
The solution
This is really easy to fix.
On the server do the following:
- Launch Powershell as an administrator
- Run:
Install-Module dbatools
- Answer “Y” when prompted (twice for me).
- Run
Reset-DbaAdmin -SqlServer localhost\SQLEXPRESSS
(or whatever your database is, a “.” will suffice for a standard default sql installation”)
- Answer “Y” to the prompts
- Enter your new sa password when prompted
- Wait
That should be it.
Try logging in as “sa” with your new password and you can now are good to go.
Full details of the dbatools can be found here; https://dbatools.io/functions/other/reset-dbaadmin/
Thanks for Help.
This artical helpful to reset password.