Monday, October 18, 2010

Reset password for sa using windows authentication

So, happily installing the new database on my dev machine and realized had forgotten the "sa" password. It kept on giving me the infamous "Login failed for user sa, error 18456" error message.

So, I googled and found the following two methords

sp_password NULL,'new_password','sa'
go


Used this and it worked like a charm... Another method I found was

1. Open the "SQL Server Enterprise Manager". This is usually under "Start"-->"Programs"-->"Microsoft SQL Server".

2. Navigate to the "Logins" object under the "Security" folder on the SQL Server you wish to administer. Then, right click on the 'sa' account and select "Properties".

3. Now, enter a new password in the "Password" field under the "Authentication" options.

No comments: