• Change SQL Server Password Using SQL Script

    Try this :-

    Open the SQL Server Management Studio.

    Open a New Query.

    Copy, paste, and execute the following:

    GO

    ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]

    GO

    USE [master]

    GO

    ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE

    GO

    where NewPassword is the password you wish to use for the sa account.

    SSMS Expert