How do I change the password of the sa user of the SQL server database

Publication Date:  2016-11-21 Views:  274 Downloads:  0
Issue Description
How do I change the password of the sa user of the SQL server database?
Solution
1. Start the command-line interface, log in to the SQL Server database as the sa user (the password is password), and view the computer name.
osql -U sa –P password
sp_password null, 'New password'
go
exit
2. When the password is changed, run the following command to log in to the SQL Server database:

If the login succeeds, the password is changed successfully.
osql -U sa –P New password

END