How To Recover The SA Password On SQL Server 2008 R2

If you’ve lost the SA password of your SQL Server 2008 R2 computer, don’t panic; it can be recovered! To recover a lost SA password on SQL Server 2008 R2, do the following:

  1. Start SQL Server Configuration Manager
  2. Stop the SQL Server services
  3. Right click the SQL Server (<<Instance name of SA password to recover>>)
  4. Click Properties
  5. Click the Advanced tab
  6. Edit the Startup Parameters, prepending -m; at the start of the existing Startup Parameter settings
  7. Start the SQL Services (It will go into Single User Mode)
  8. On the SQL Server, open a command prompt
  9. Type:

    sqlcmd

  10. Hit enter
  11. Type:

    CREATE LOGIN recovery WITH PASSWORD = ‘New SA Password!’

  12. Hit enter
  13. Type:

    Go

  14. Hit enter
  15. Type:

    sp_addsrvrolemember ‘recovery’, ‘sysadmin’

  16. Hit enter
  17. Type:

    Go

  18. Hit enter
  19. Stop the SQL service
  20. Edit the Startup Parameters, removing the -m; from the start of the existing value
  21. Start the SQL service
  22. Log into SQL Server 2008 R2 with the recovered SA account using SQL Server Management Studio
  23. Navigate to Security -> Logins
  24. Right click the sa account and click Properties
  25. Reset the password and click OK

Your SA Password is now recovered 🙂

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Leave a comment

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