views:

132

answers:

1

Hi

I want to check if SQL logins have passwords same as thier login name. E.g. login name 'abc123' has password= 'abc123'. I need to do this for a security audit across many 2000 and 2005 servers.

Is it possible to check using TSQL?

Thanks in advance

+17  A: 
select * from syslogins where pwdcompare (name,password)=1

BOL: pwdcompare

Manjot
+1. Very nice! .
Mitch Wheat
+1 didn't know that function existed, very handy.
Paul Creasey
And it works on both SQL 2000 and 2005.thanks for sparing your time.
Manjot