Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

SQL Users and Password Policies

$
0
0
Hi Team,There is an audit requirement to extract all the users and their corresponding password policy. I used the below query however, I am not getting the password policy used. I would need help to get the same.SELECT [name] AS [SQL_User] ,[is_policy_checked] as [IsPwdPolicyEnforced] ,[is_expiration_checked] as [IsPwdExpirationEnforced] ,LOGINPROPERTY([name], 'IsExpired') AS [IsAccountExpired] ,LOGINPROPERTY([name], 'IsLocked') AS [IsAccountLocked] ,LOGINPROPERTY([name], 'IsMustChange') AS [IsMustChange] ,LOGINPROPERTY([name], 'PasswordLastSetTime') AS [PasswordLastResetDT] ,LOGINPROPERTY([name], 'BadPasswordCount') AS [BadPasswordCount] ,LOGINPROPERTY([name], 'DefaultDatabase') AS [DefaultDB]FROM [sys].[sql_logins]Thanks,V S Phanindra Kumar P

Viewing all articles
Browse latest Browse all 3145

Trending Articles