6

I just forgot the password. Can anyone help me how to get back the password.

AstroCB
  • 12,337
  • 20
  • 57
  • 73
jbcedge
  • 18,965
  • 28
  • 68
  • 89
  • 3
    This question appears to be off-topic because it is about recovering passwords and attracting spam. But mostly about attracting spam. –  Jul 22 '13 at 21:18

4 Answers4

27

There is no way to get the old password back. Log into the SQL server management console as a machine or domain admin using integrated authentication, you can then change any password (including sa).

Start the SQL service again and use the new created login (recovery in my example) Go via the security panel to the properties and change the password of the SA account.

enter image description here

Now write down the new SA password.

Rahul Shinde
  • 1,522
  • 1
  • 15
  • 17
1800 INFORMATION
  • 131,367
  • 29
  • 160
  • 239
5

Wait!

There is a way to retrieve the password by using Brute-Force attack, have a look at the following tool from codeproject Retrieve SQL Server Password


How to use the tool to retrieve the password

To Retrieve the password of SQL Server user,run the following query in SQL Query Analyzer

"Select Password from SysxLogins Where Name = 'XXXX'" Where XXXX is the user

name for which you want to retrieve password.Copy the password field (Hashed Code) and

paste here (in Hashed code Field) and click on start button to retrieve

I checked the tool on SQLServer 2000 and it's working fine.

Wael Dalloul
  • 22,172
  • 11
  • 48
  • 57
  • As of SQL Server 2005 SQL Server Query Analyzer was replaced by SQL Server Management Studio. – RoastBeast Aug 24 '15 at 17:13
  • The OP specified SQL Server 2005. The query `Select Password from SysxLogins Where Name = 'XXXX'` will not work in that version. The correct query is `Select Password from SysLogins Where Name = 'XXXX'` – RoastBeast Aug 24 '15 at 17:16
2

Granted you have administrative Windows privileges on the server, another option would be to start SQL Server in Single User Mode, using the Startup parameter "-m". Doing this, you can login using SQLCMD, create a new user and give it sysadmin privileges. Finally, you have to disable Single User Mode, login to SSMS using your new user, and go to Segurity/Logins and change "sa" user password.

You can check this post: http://v-consult.be/2011/05/26/recover-sa-password-microsoft-sql-server-2008-r2/

Nathan
  • 2,705
  • 23
  • 28
1

MSSQL have its own database management tool called as "MSSQL Server Management Studio (SSMS)". Here are steps to reset SA password using SSMS :

1] Open SSMS management console, it will prompt for authentication details,

Select Server Type : "Database Engine", Server name : IP / hostname of your MSSQL server Authentication : Windows Authentication

Once you select Authentication type as "Windows Authentication", the user name and password fields will be grayed out and it will allow you to login SQL server without entering login details. Windows Authentication is possible only when you are logged on same server in RDP on which SQL service is present.

2] once you are in, under "Object Explorer" expand Security and then Logins 3] locate and right click on user SA and select Properties 4] under General section enter desired password in front of "Password:" and "Confirm Password:" 5] hit OK at bottom.

This is the easiest and secure way to reset SA password instead of using any third party non secure tools