How To Recover The SA Password On SQL Server 2005

If you’ve lost the SA password of your SQL Server 2005 instance, you can recover the password with this command. To recover an SA password on a SQL Server 2005 server, do the following:

  1. Open a command prompt on the SQL server
  2. Type:

    OSQL -S SQLServerName -E

  3. Hit enter
  4. Type:

    EXEC sp_password NULL, ‘Password’, ‘sa’

  5. Hit enter
  6. Type:


  7. Hit enter

Obviousbly replace SQLServerName with the name of your SQL Server 2005 instance (including the server name). This command will then reset the SA password to Password, you can then log into your SQL server and change the password, or change the password you want to recover to in the command prompt.

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 *