SQL Server - reset sa pwd in sql server 2005 express

Asked By Sanjeev Sircar on 07-Feb-08 09:40 PM
i have forgotten my sa pwd in sql server 2005 express edition on  a computer which has Windows Vista
Please let me know as how to reset it

The database should still support Windows Authentication. - Peter Bromberg replied to Sanjeev Sircar on 07-Feb-08 09:48 PM

Login locally as an Administrator and connect to the database using Windows Authentication. Then reset the sa password.

If you properly secured the database BUILTIN\Administrators has been removed from server admins and this will not work (but you probably didn't!)

 Additionally, you should not be logging in as sa to begin with. Create other accounts with the appropriate permissions and use them instead.

How to change your SA password - K Pravin Kumar Reddy replied to Sanjeev Sircar on 08-Feb-08 12:23 AM

How to change your SA password

loadTOCNode(2, 'summary');
1. On the computer that is hosting the instance of MSDE to which you are connecting, open the command prompt window.
2. Type the following command, and then press ENTER:

osql -U sa

At the Password: prompt, press ENTER if your password is blank or type the current password. This connects you to the local, default instance of MSDE by using the sa account. To connect by using Windows authentication, type this command: use osql -E

Note If you are using SQL Server 2005 Express, avoid using the Osql utility, and plan to modify applications that currently use the Osql feature. Use the Sqlcmd utility instead.

For more information about the Sqlcmd utility, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ms165702.aspx (http://msdn2.microsoft.com/en-us/library/ms165702.aspx)
3. Type the following commands, on separate lines, and then press ENTER:
sp_password @old = null, @new = 'complexpwd',  @loginame ='sa' 
   go
Note Make sure that you replace "complexpwd" with the new strong password. A strong password includes alpha-numeric and special characters, and a combination of upper and lower case characters.

You will receive the following informational message, which indicates that your password was changed successfully:
Password changed.

reference

http://support.microsoft.com/kb/322336

-praveen

still a problem - Sanjeev Sircar replied to K Pravin Kumar Reddy on 08-Feb-08 08:20 AM

the soln. you suggested would work if my sa pwd was set to blank.

else it needs the old pwd to set the new pwd.

still an is - Sanjeev Sircar replied to Peter Bromberg on 08-Feb-08 08:23 AM

i can access the databases using both Windows and Sql Authentication, as for the latter the pwd is saved on the login screen and for the former, it needs no pwd.

but once i'm into Sql Server Management Studio Express, there's no place to change my sa password

Expand the Security Folder in object explorer. - Peter Bromberg replied to Sanjeev Sircar on 08-Feb-08 09:07 AM
You will see a nodelist called "logins" Open up the one that says "sa" and change the password.
ALTER LOGIN - F Cali replied to Sanjeev Sircar on 12-Feb-08 01:11 PM

Here's how to change the password of a login without knowing the old password:

ALTER LOGIN sa WITH PASSWORD = 'NewPasswordHere';

The user that is executing this command must have CONTROL SERVER permission.

reset sql password - happykaka happykaka replied to Sanjeev Sircar on 30-Dec-09 03:31 AM
You can reset the SQL log in password in two ways. If you are skilled SQL command, you can reset sa password with some simple codes like [osql -U sa -P ”" -Q ”sp_password NULL,<newpassword>,sa”] . If you have no ideal about SQL command, I would like to recommend you to free download MS SQL Server Password Unlocker, which helps to instantly http://www.passwordunlocker.com/sql-server-password-unlocker.html without data loss.

Personally, I would like to use SQL password changing tool, like MS SQL Server Password Unlocker. I have no ideal about the sql commands and other setting but I http://www.passwordunlocker.com/sql-server-password-unlocker.html. My friend recommended me MS SQL Server Password Unlocker, and I used it. Just one click, I http://www.passwordunlocker.com/sql-server-password-unlocker.html

reset sql password - happykaka happykaka replied to Sanjeev Sircar on 30-Dec-09 03:32 AM
You can reset the SQL log in password in two ways. If you are skilled SQL command, you can reset sa password with some simple codes like [osql -U sa -P ”" -Q ”sp_password NULL,<newpassword>,sa”] . If you have no ideal about SQL command, I would like to recommend you to free download MS SQL Server Password Unlocker, which helps to instantly http://www.passwordunlocker.com/sql-server-password-unlocker.html without data loss.

Personally, I would like to use SQL password changing tool, like MS SQL Server Password Unlocker. I have no ideal about the sql commands and other setting but I http://www.passwordunlocker.com/sql-server-password-unlocker.html. My friend recommended me MS SQL Server Password Unlocker, and I used it. Just one click, I http://www.passwordunlocker.com/sql-server-password-unlocker.html

yee lau replied to Sanjeev Sircar on 03-Aug-10 11:54 PM

I know a http://www.passwordunlocker.com/sql-server-password-recovery.html tool which can instantly reset MS SQL Server and Express 2000/2005/2008 password, including SA and other users password, no matter the password is how long and complex, Only the master.mdf file is needed for resetting the password within seconds. And you do not need to reinstall MS SQL Server on your PC. Save more time and trouble.

michael clark replied to Sanjeev Sircar on 28-May-12 02:21 AM
I just came across an article which presents 3 methods to reset sa password in SQL Server, please refer to http://www.top-password.com/knowledge/change-sql-server-password.html

I wish it'll be helpful.
Good luck!