Sometimes you just need to reset the SA account password in SQL Server. You can easily reset the password in SQL Server Management Studio , but you can also use a Transact_SQL script or command prompt.
Using SQL Script
Step 1: Open the SQL Server Management Studio.
Step 2: Then, open a New Query and copy, paste, and execute the following:
GO ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master] GO USE [master] GO ALTER LOGIN [sa] WITH PASSWORD=N’Password’ MUST_CHANGE GO
Note: The Password is the new password you would like to use with the SA account.
Using command prompt
Step 1: Go to the command prompt of the server and osql –L.
Step 2: Copy full name of SQL Server and type: OSQL -S [servername] -E.
Step 3: Execute the following query: sp_password NULL, ‘[new_password]’, ’sa’.
Step 4: Then, GO.