SQLTeam.com | Weblogs | Forums

Reset SA Password


#1

Can we reset password of SA account through sqlcmd?


#2

Why not? Just use sp_password or ALTER LOGIN once authenticated.


#3

I think the command line query would be:

EXEC sp_password 'old_password' , 'new_password', 'sa'


#4

Sorry, I am getting an error message "Login failed for user 'username'. (Microsoft SQL Server, Error: 18456)
".


#5

You can follow the directions on this page: https://msdn.microsoft.com/en-us/library/dd207004.aspx