Home > Software design >  What SQL script or SSMS feature will change my login password when I am not sa
What SQL script or SSMS feature will change my login password when I am not sa

Time:08-30

I am not sa, I own a database and I can log in to the server through SSMS. What SQL statement can I write to change my own login password or is there a way to do it through the SSMS interface?

CodePudding user response:

To change your password using T-SQL, use ALTER LOGIN. Login as normal and specify both your old and new password:

ALTER LOGIN YourLogin
    WITH PASSWORD = '<your-new-password>'
    OLD_PASSWORD = '<your-old-password>';
  • Related