Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

How to reset MSSQL sa user password from command line

Type: Code Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Beginner Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2007-Apr-07
Networking, Programming and Graphics - Tutorials
Visited: 9495 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Stephen Think

This tutorial will show you how to change the password from the command line on MSSQL Server or MSDE.

1.Open a command prompt window by selecting "Start"-->"Run...", and typing "cmd.exe" in the "Run" dialog box.
2.Change to the directory in which the MSSQL or MSDE utilities are stored (this is usually C:MSDEbinn, C:Program FilesMSSQLbinn, etc.).
3.Type the following command where <newpassword> is the password you have chosen:
osql -U sa -P "" -Q "sp_password NULL,<newpassword>,sa"
Rate this tutorial:                    
Post Comment

    • ( dreamupup [ at ] gmail . com ),

      posted on 2009-Dec-10 | 12:32:31 AM
      MS SQL Server Password Unlocker can instantly change SA password with no data loss.
      source: http://www.passwordunlocker.com/sql-server-password-unlocker.html
    • ( dreamupup [ at ] gmail . com ),

      posted on 2009-Dec-10 | 12:35:01 AM
      With MS SQL Server Password Unlocker, you can change reset the sa and other user passwords saved in master.mdf

    • posted on 2009-Dec-10 | 06:04:37 AM
      true, but this is hell of an easy way to reset MSSQL sa user password
    • ( me [ at ] rajeshgoutam . com ),

      posted on 2010-Jul-20 | 10:08:16 PM
      Yes... Its working... Thanks for Support
Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: