Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

sp_helplogins doesn't show a column for this. I need a listing of all logins, with the status of their "Enforce password policy" checkbox. This is for an auditor, and the standard practice is for screenshots of every login. I'd prefer to make this simpler on me (to generate) and simpler on them to audit.

share|improve this question
add comment

2 Answers

Here's the start of a report:

SELECT
    sp.name AS LoginName,
    sl.is_policy_checked AS IsPasswordPolicyEnforced
    FROM sys.server_principals sp
    LEFT OUTER JOIN sys.sql_logins sl ON sl.principal_id = sp.principal_id
    WHERE sp.type IN ('S', 'G', 'U');

Note that this property only applies to SQL logins.

share|improve this answer
add comment

Hmph. Found it : http://stackoverflow.com/questions/3244387/help-needed-to-write-sql-query-for-sql-logins

SELECT name, is_policy_checked FROM sys.sql_logins

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.