Skip to content

Commit d2800dd

Browse files
Update sp_Blitz.sql validate logins if we are sysadmin
sp_validatelogins is only executed if we are not sysadmin added execution if we are sysadmin
1 parent 39f26d8 commit d2800dd

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

sp_Blitz.sql

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,9 +1836,18 @@ AS
18361836
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 2301) WITH NOWAIT;
18371837

18381838
/*
1839-
#InvalidLogins is filled at the start during the permissions check
1839+
#InvalidLogins is filled at the start during the permissions check IF we are not sysadmin
1840+
filling it now if we are sysadmin
18401841
*/
1841-
1842+
IF @sa = 1
1843+
BEGIN
1844+
INSERT INTO #InvalidLogins
1845+
(
1846+
[LoginSID]
1847+
,[LoginName]
1848+
)
1849+
EXEC sp_validatelogins;
1850+
END;
18421851
INSERT INTO #BlitzResults
18431852
( CheckID ,
18441853
Priority ,

0 commit comments

Comments
 (0)