How to Reset SA Password in Sql Server

Four Methods:Change SQL SA password from a command promptReset SA password using SSMSReset SA password with SQL Password Recovery ToolWhen You Have SA Disabled

SA user (abbreviation for "System Administrator") is the administrative login for MS SQL Server. What do you do if you forgot SQL Server SA password ? Reinstall MS SQL Server or just drop everything and walk out of here? For whatever reason, if you forgot your SQL Server SA password and the windows account told you don’t have the permissions to change it, this article will demonstrate several options for resetting your SQL SA password.


These steps work for SQL Server 2005, 2008, 2012 and later.

Method 1
Change SQL SA password from a command prompt

  1. Image titled Reset SA Password in Sql Server Step 1
    1
    Go to the command prompt of the server and type in command prompt osql –L
  2. Image titled Reset SA Password in Sql Server Step 2
    2
    Copy full name of SQL Server and type: OSQL -S <insert_servername_here> -E
  3. Image titled Reset SA Password in Sql Server Step 3
    3
    Execute the following query: sp_password NULL, ‘<insert_new_password_here>’, ’sa’
  4. Image titled Reset SA Password in Sql Server Step 4
    4
    GO

Method 2
Reset SA password using SSMS

  1. Image titled Reset SA Password in Sql Server Step 5
    1
    Open SSMS management console. This is usually under Start -> All Programs -> Microsoft SQL Server 2005 -> SQL Server Management Studio Express.
  2. Image titled Reset SA Password in Sql Server Step 6
    2
    Connect to your instance of SQL Server via Windows Authentication.
  3. Image titled Reset SA Password in Sql Server Step 7
    3
    Once open, navigate to “Logins” object under the “Security”. Once expanded, right-click on the ‘SA’ user, and choose Properties.
  4. Image titled Reset SA Password in Sql Server Step 8
    4
    Now, enter desired password in front of “Password” and “Confirm Password” field and click OK.

Method 3
Reset SA password with SQL Password Recovery Tool

  1. Image titled Reset SA Password in Sql Server Step 9
    1
    Run the SQL Password Recovery program and then click “Open” to load the master .mdf file.
  2. Image titled Reset SA Password in Sql Server Step 10
    2
    Select SA user name to reset the forgotten SA password, or select any other user name which you forgot the password. Click “Change Password” to reset password.
  3. Image titled Reset SA Password in Sql Server Step 11
    3
    Enter the preferential password and click “OK”.

Method 4
When You Have SA Disabled

  1. Image titled Reset SA Password in Sql Server Step 12
    1
    Its an extra tricky scenario; sometimes SA is disabled.
  2. Image titled Reset SA Password in Sql Server Step 13
    2
    Start SQL server as single user using -m flag via command line.
  3. Image titled Reset SA Password in Sql Server Step 14
    3
    Run as Administrator
  4. Image titled Reset SA Password in Sql Server Step 15
    4
    On the Server Roles page, select sysadmin and reset password.

Tips

  • The easiest and most efficient way to reset SA password is to take use of SQL Password Recovery Tool. You can use some SQL Password Recovery tool to reset SQL SA password successful on SQL. Such as SQL Password Geeker, SQL Password Rescuer.

Article Info

Categories: Databases