I need to write SQL Query to Retrive the Following Settings of SQL Logins for SQL server 2005:
1.Enforce password policy
2.Enforce password expiration
3.User must change password at next login
Thanx in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
should give you the first two (is_policy_checked and is_expiration_checked columns)
and you can use
SELECT LOGINPROPERTY('sa', 'IsMustChange')to find if the user must change password at next loginSo putting it all into one query…