How to fix an error "change password failed for login sa"?

Sometimes you receive following error while trying to reset MS SQL sa password via SQL Management Studio using Windows Authentication. Follow below steps to resolve it.

Error Message While Resetting SA Password

  1. Login to your Windows VPS via RDP (Remote Desktop Access). This tutorial will guide you to connect to Windows VPS server using the RDP from different operating systems.

  2.  Click on Start and go to SQL Server Configuration Manager.

    MS SQL Configuration Manager

  3.  Right click on the SQL Server and select Properties. In the Properties window, select Startup Parameters tab.

    Startup Parameters

  4.  In Specify a startup parameter field, type -m; (including semicolon), and click on Add button.

    Add Startup Parameter

  5.  Click on Apply button, and you will be asked to restart MS SQL service, Click OK to close the popup window and click on OK to close the properties tab.

    Restart MS SQL Service Pop-up

  6.  Right click on SQL server, and restart the MS SQL service.

    Restart MS SQL Service

  7.  Now, open Command Prompt and run the below query assuming your SQL Server instance name is SQLEXPRESS. Note that, we've reset the password to "AccuWebHosting" for this example, but you'll have to replace your choice of password in @new argument.

    osql -E -S .\SQLEXPRESS
    exec sp_password @new='AccuWebHosting', @loginame='sa'
    go
    alter login sa enable
    go
    exit


    MS SQL Query From Command Prompt

  8. Again go to SQL Server Configuration ManagerRight click on MS SQL server and select Properties. In the Properties window, select tab Startup Parameters. From the startup Parameter list, select -m; from the list and click on Remove button.

    Remove Startup Parameters

  9.  Click on Apply button, you will be asked to restart MS SQL service, Click OK to close the popup window and click on OK to close the properties tab.

    Restart MS SQL Service Pop-up

  10.  We need to restart the MS SQL service again. Follow step #6 to restart the MS SQL service. Now you can login to SQL Server Management Studio using the new password AccuWebHosting.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to use MSSQL Activity Monitor to find the most expensive query?

A slow and long running SQL query execution consumes much processor, memory, and disk of your...

How to change user access mode in MSSQL Server?

MSSQL Server provides a feature to restrict your Database access for users. It can be performed...

How to install SQL Server Reporting Service (SSRS) on MSSQL 2014 Express Edition?

SQL Server Reporting Services is used for creating, publishing, and managing reports, and...

How do I connect to MSSQL Server 2012 from SQL Server Management Studio?

This article will guide you on how to connect to MS SQL Server 2012 from SQL Server Management...

How to change Database Collation in MsSQL Server?

Collation is a configuration level setting in the MSSQL. It directs how the character data will...