Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2010, 10:34 PM
Registered User
 
Join Date: Sep 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Efficient ways to reset lost sql sa password

Have you ever forgot or lost your SQL Server sa password? Did you hava any ideals to reset your lost sa password? Or choosed to reinstall MS SQL Server on your PC again? I once forgot my SQL sa password and I reinstalled SQL Server at last, because I failed to find some good methods to solve the problem. What annoying and terrible experience it is! In order to avoid reinstalling SQL Server for a second time, i collect some methods and try them by myself, to reset SQL Server Password for sa account.

Method 1: Reset SQL Server sa password by Windows Authentication

If Builtin/Administrator is present in SQL Server, you can login with an ID which is member of Administrators group and reset sa password in SQL Server. Just do as follows:

Step 1. Login into SQL server using Windows Authentication.
Step 2. In Object Explorer, open Security folder, open Logins folder. Right Click on sa account and go to Properties.
Step 3. Type a new SQL sa password, and confirm it. Click OK to finish.

This way is easilily to reset the sql server sa or other account password, but you need to have the valid Builtin/Administrator account.
 
Old September 20th, 2010, 11:11 PM
Registered User
 
Join Date: Sep 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Efficient ways to reset lost sql sa password

And here is another way that maybe also could reset ours lost sa password, but i have problems to verify this way, can somebody give some ideas about the method.

Method 2: Use the Query Windows in Management Studio to reset sql sa password

Step 1. Open SQL Server Management Studio
Step 2. Open a new query
Step 3. Type the follow commands and excute:

Code:
GO
      ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
      GO
      USE [master]
      GO
      ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE
      GO
The NewPassword is set for your SQL Server sa account.
 
Old September 22nd, 2010, 05:33 AM
Registered User
 
Join Date: Sep 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Efficient ways to reset lost sql sa password

Use command prompt is also an easy way to reset lost sa password. See the commands below:

Method 3: Use Command Prompt to reset your lost SQL sa password

Step 1. Open a command prompt (Start -> Run -> cmd)
Step 2. Type the follow commands, and press Enter after each line:
Code:
      Osql -S yourservername -E
      1> EXEC sp_password NULL, 'yourpassword', 'sa'
      2> GO
Of course, you can reset your other sql account password, just by changing the 'sa' to your another sql account name.

Last edited by Shandelzare; September 22nd, 2010 at 05:36 AM..
 
Old September 23rd, 2010, 06:21 AM
Registered User
 
Join Date: Sep 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Efficient ways to reset lost sql sa password

Emm, if there still have trouble on resetting your sql sa password, you can try to get help from some sql server password recovery software, which can easily and instantly reset lost sql sa password.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset SQL Logon Password thru Access Front End feets Access VBA 5 March 11th, 2009 09:22 AM
reset sa pwd in sql server 2005 express sansircar SQL Language 0 February 7th, 2008 10:50 PM
Forgotten SQL sa password GeekyBern SQL Server 2000 2 August 5th, 2005 09:39 AM
sa password ckentebe SQL Server 2000 2 January 5th, 2005 05:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.