Resetting SQL Server Account Passwords
March 16, 2018 Leave a comment
Recently ran into an issue where I needed to reset the SQL sa account password. The problem is, no one had administrative access to the SQL instance. However, we did have local administrator access. As of SQL Server 2008, being the local admin, or, being part of the local administrators group does not automatically give you sysadmin access to SQL.
I tried a few methods out there, but nothing seemed to work… finally stumbled across this post on MSSQLTips https://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/
The article explains that launching SQL Server Management Studio using PsExec, launches it as NT AUTHORITY\SYSTEM, which does have access to SQL Server by default. Was able to pop into SQL, and reset the sa account password.
.\PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"
It took longer to download and extract the Sysinternals tools than to actually do the work. Saved me a lot of time!