Check SQL Authentication Login Account Password

Did you come across any situation where you wanted to make sure that the password you set for a SQL account is what you really wanted? Below is how you can validate the password for a particular account. With this methord, you can find out the forgotten password for a SQL account without causing any audit failures and by not changing any security settings.

SELECT name FROM sys.syslogins WHERE pwdcompare ('SomePasswordWhichYouKnow',password) =1

When you run the above query, you will get the list of accounts which has password set as SomePasswordWhichYouKnow.

This way, you can figure out what password was set while creating an account (SQL authentication account)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.