It is frustrating to forget the sa password . Despite maintaining a password vault , it is possible someone has changed the password or you don’t have access to the password vault. Don’t worry. If you have access to a Local administrator member than this method can help
1) Set the Single-User mode for the SQL Server Instance
go to start->run->type cmd->type services.msc->search for SQL server (MSSQLserver) name->right click properties->
->under General tab you can see path to executable. Make a note of the sql server executable path .
go to start->run->type cmd->type <sql server executable path> -m s<instance_name>
example if SQL Server Instance is called “Test1”:
C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Binn\sqlserver.exe –m sTest1
Note:
a) Stop the SQL Server Agent service before connecting to an instance of SQL Server in single-user mode; otherwise, the SQL Server Agent service uses the connection, thereby blocking it.
b) Using the –s switch avoids the error : Sql server installation is either corrupt or has been tampered with error getting instance id from name
2) Add a sysadmin account through SQLCMD
EXEC sp_addsrvrolemember 'Org1\Johnny', 'sysadmin'; GO
3) Return to multiuser mode for the SQL Server Instance
Stop the single user-mode session
Start the SQL Server Instance in multiuser mode
4) Change sa password
Using either SSMS or SQLCMD , reset the sa password
sp_password NULL,'new_password','sa'
Read More
Find Weak passwords in SQL Server - SQL Server DBA