Skip to content

Commit

Permalink
#3486 sp_BlitzFirst add ExpertMode = 2
Browse files Browse the repository at this point in the history
@expertmode = 2 skips calling sp_BlitzFirst. Closes #3486.
  • Loading branch information
BrentOzar committed Apr 15, 2024
1 parent 0dd8c89 commit 385b984
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sp_BlitzFirst.sql
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ IF @LogMessage IS NOT NULL
END;

IF @SinceStartup = 1
SELECT @Seconds = 0, @ExpertMode = 1;
BEGIN
SET @Seconds = 0
IF @ExpertMode = 0
SET @ExpertMode = 1
END;


IF @OutputType = 'SCHEMA'
Expand Down Expand Up @@ -3302,7 +3306,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
INSERT INTO #PerfmonCounters ([object_name],[counter_name],[instance_name]) VALUES (@ServiceName + ':SQL Statistics','SQL Re-Compilations/sec', NULL);

/* Server Info - SQL Compilations/sec - CheckID 25 */
IF @ExpertMode = 1
IF @ExpertMode >= 1
BEGIN
IF (@Debug = 1)
BEGIN
Expand All @@ -3325,7 +3329,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
END

/* Server Info - SQL Re-Compilations/sec - CheckID 26 */
IF @ExpertMode = 1
IF @ExpertMode >= 1
BEGIN
IF (@Debug = 1)
BEGIN
Expand Down Expand Up @@ -4674,7 +4678,7 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
ID,
CAST(Details AS NVARCHAR(4000));
END;
ELSE IF @ExpertMode = 1 AND @OutputType <> 'NONE' AND @OutputResultSets LIKE N'%Findings%'
ELSE IF @ExpertMode >= 1 AND @OutputType <> 'NONE' AND @OutputResultSets LIKE N'%Findings%'
BEGIN
IF @SinceStartup = 0
SELECT r.[Priority] ,
Expand Down

0 comments on commit 385b984

Please sign in to comment.