MCITP

MCITP

Tuesday, September 11, 2012

How to check the date when the password of SQL logins will expire.


Select name
         ,create_date
         ,modify_date
         ,default_database_name
         ,is_policy_checked
         ,is_expiration_checked
         ,loginproperty(name, 'DaysUntilExpiration') as 'Number of days to expire'
         ,loginproperty(name, 'PasswordLastSetTime') As 'Last Time password is set'
  From sys.sql_logins;

No comments:

Post a Comment

Followers