Skip to content

Commit 23a8b24

Browse files
authored
Merge pull request #3378 from Montro1981/SQL-Server-First-Responder-Kit_3376
#3376 Added Informational message about skipping checks
2 parents 355e36a + f00c58a commit 23a8b24

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sp_Blitz.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,25 @@ AS
630630
FROM (VALUES(NULL, 2301, NULL)) AS v (DatabaseName, CheckID, ServerName) /*sp_validatelogins*/
631631
WHERE @SkipValidateLogins = 1
632632

633+
IF @sa = 0
634+
BEGIN
635+
INSERT INTO #BlitzResults
636+
( CheckID ,
637+
Priority ,
638+
FindingsGroup ,
639+
Finding ,
640+
URL ,
641+
Details
642+
)
643+
SELECT 223 AS CheckID ,
644+
0 AS Priority ,
645+
'Informational' AS FindingsGroup ,
646+
'Some Checks Skipped' AS Finding ,
647+
'' AS URL ,
648+
'User ''' + @SUSER_NAME + ''' is not part of the sysadmin role, so we skipped some checks that are not possible due to lack of permissions.' AS Details;
649+
END;
650+
/*End of SkipsChecks added due to permissions*/
651+
633652
IF @SkipChecksTable IS NOT NULL
634653
AND @SkipChecksSchema IS NOT NULL
635654
AND @SkipChecksDatabase IS NOT NULL

0 commit comments

Comments
 (0)