Reset SA Password in Sql Server
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.
Contents
Steps
Option 1: Change SQL SA password from a command prompt
- Go to the command prompt of the server and type in command prompt osql –L
- Copy full name of SQL Server and type: OSQL -S <insert_servername_here> -E
- Execute the following query: sp_password NULL, ‘<insert_new_password_here>’, ’sa’
- GO
Option 2: Reset SA password using SSMS
- Open SSMS management console. This is usually under Start -> All Programs -> Microsoft SQL Server 2005 -> SQL Server Management Studio Express.
- Connect to your instance of SQL Server via Windows Authentication.
- Once open, navigate to “Logins” object under the “Security”. Once expanded, right-click on the ‘SA’ user, and choose Properties.
- Now, enter desired password in front of “Password” and “Confirm Password” field and click OK.
Option 3: Reset SA password with SQL Password Recovery Tool
- Run the SQL Password Recovery program and then click “Open” to load the master .mdf file.
- 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.
- Enter the preferential password and click “OK”.
Option 4: When You Have SA Disabled
- It's an extra tricky scenario; sometimes SA is disabled.
- Start SQL server as single user using -m flag via command line.
- Run as Administrator
- 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.