2021. 11. 25. 16:45
SQL SERVER
SELECT ServerName = @@SERVERNAME
, LoginName = sp.name
, LockoutTime = LOGINPROPERTY(sp.name, 'LockoutTime')
, IsLocked = LOGINPROPERTY(sp.name, 'IsLocked')
, BadPasswordCount = LOGINPROPERTY(sp.name, 'BadPasswordCount')
, DaysUntilExpiration = LOGINPROPERTY(sp.name, 'DaysUntilExpiration')
FROM master.sys.server_principals sp
WHERE (
LOGINPROPERTY(sp.name, 'IsLocked') = 1
OR LOGINPROPERTY(sp.name, 'BadPasswordCount') > 0
OR LOGINPROPERTY(sp.name, 'DaysUntilExpiration') < 5
)
AND sp.type_desc = N'SQL_LOGIN'
ORDER BY sp.name;
'SQL SERVER' 카테고리의 다른 글
SQL 실행횟수 모니터링 (0) | 2022.03.15 |
---|---|
DB 이관시 설정상태 체크, 변경 (0) | 2022.02.07 |
Examine IO subsystem latencies IN SQL SERVER (0) | 2021.11.24 |
SQL Server wait Statistics (0) | 2021.11.23 |
linked server Disable하기 (0) | 2021.10.21 |