lost SQL Server password – Password Recovery https://www.top-password.com/blog Provide useful password recovery tricks, guides and software Mon, 19 May 2014 08:30:42 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.1 SQL Server: Lost SA Password or SA Account Is Locked out https://www.top-password.com/blog/sql-server-lost-sa-password-or-sa-account-is-locked-out/ Mon, 19 May 2014 08:21:06 +0000 http://www.top-password.com/blog/?p=3440 Lost SA password? SA user is locked out and login fails with Windows Authentication. Now what? Here are some of the options I think you may do:

  • You will try logging in as SA with all possible passwords you have in your mind.
  • You will look for the SA password on your computer hard-drive or in your emails (If you had stored it in some file which is a bad practice).
  • Try to restore MASTER database from database backup. However, this will not help because you will run in to the same issue as you don’t remember the SA password.
  • Rebuild Master database. This may not help as you will lose all system/server level configurations and settings including logins, permissions and any server level objects.
  • Re-install SQL Server 2012 and attach all user databases. This may not work as you may experience same issues that you would experience with the option above.

However, the best and fastest way is to unlock SA account with SQL Server Password Changer. Get instant control over locked databases no matter how many instances of Microsoft SQL Server are running. Follow the steps below and you can easily unlock SQL Server database in case you lost SA password or SA account is locked out.

  1. First of all, stop the SQL Server service to prevent it blocking access to the master.mdf file.
  2. Download and install the SQL Server Password Changer program. After you’ve installed it, launch the program.
  3. Click on the Open File button. In the file open dialog, select the master database (master.mdf). Usually the master.mdf file is located in C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\, where MSSQL11.MSSQLSERVER is the name of your SQL Server instance.
  4. Once choosing the master.mdf file, the program shows you a list of SQL users.

    Select the SA account and click on Change Password. Set a new password and click OK.

  5. The program will replace the lost SA password and also unlock your SA account in no time.
  6. Restart your SQL Server service and you can then login to SA account successfully.
]]>
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.

]]>