Friday , February 21 2020
Home / Database / MS SQL Server / Username and Password in SQL Server

Username and Password in SQL Server

User Names and passwords are saved in sys.syslogins table of Master DB but SQL Server doesn’t save passwords in plain or encrypted form for the obvious purpose of Security. When you query sys.syslogins table, it will return an un-readable string in password field. Passwords are saved in hashes and because they are one way hashes hence they can’t be reversed. We can use pwdcompare to compare password hashes and can identify a user but can never return a plain password string. This query might help.

SELECT * FROM sys.syslogins WHERE pwdcompare(‘somepassword’, password) = 1

About Sallah Ud Din Sarwar

I am a multi skilled Software Engineer with over 4 year’s industry experience in designing and developing Object oriented solutions in Multi layered & N-Tired. I have substantial success to my credit. I have consistently handled complex problems to the satisfaction of my clients by working in stressful situations. I enjoy learning and applying new technologies in a dynamic and forward thinking professional environment.

Check Also

SEO Tips: Search Engine Optimization for Site Layout Architecture

Site Layout Architecture 1. Ensure content is clear and upfront – Content should be front and ...

Leave a Reply

Your email address will not be published. Required fields are marked *