recover SQL Server password – Password Recovery https://www.top-password.com/blog Provide useful password recovery tricks, guides and software Thu, 24 Oct 2013 04:19:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.1 How to Recover SA Password on Microsoft SQL Server https://www.top-password.com/blog/recover-sa-password-on-microsoft-sql-server/ Thu, 24 Oct 2013 04:10:04 +0000 http://www.top-password.com/blog/?p=3096 If you ever lost SA password, you may have thought your only option is to reinstall SQL Server and re-attach all of the user databases. However, SQL server provides a much better disaster recovery method which preserves objects and data in the master database. Simply start SQL Server in single user mode and you can recover SA password easily with the OSQL command. Here are the detailed steps:

Part 1: Start SQL Server in Single User Mode

  1. Open SQL Server Configuration Manager.
  2. Find the SQL Server instance you need to recover the SA password.
  3. Stop the SQL Server instance.
  4. Right-click on the instance and select Properties.
  5. Click on the Advanced tab, and add -m; to the beginning of Startup parameter.
  6. Click OK and start the instance.

Part 2: Recover SQL Server SA Password

  1. Open an elevated command prompt and enter the command:
    osql -S myServer\instanceName -E
    Replace myServer\instanceName with the name of the computer and the instance of SQL Server that you want to connect to.
  2. At the next prompts, enter the following commands:
    1> alter login sa enable
    2> go
    1> sp_password NULL,'new_password','sa'
    2> go
    1> quit
  3. Stop the SQL Server instance.
  4. Remove the -m option from the Start parameters field, and then start the SQL Server service.

At this point you should be able to login to SQL Server using the SA user account and the new password you gave it. Besides recovering SA password with OSQL, you can also reset / change your forgotten SA password using the third-party software such as SQL Server Password Changer.

]]>