Skip to content

Commit d0486c5

Browse files
committed
#3119 sp_Blitz ignore recompile
For procs in system databases. Closes #3119.
1 parent 0079339 commit d0486c5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sp_Blitz.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6819,7 +6819,9 @@ IF @ProductVersionMajor >= 10
68196819
URL = 'https://www.brentozar.com/go/recompile',
68206820
Details = '[' + DBName + '].[' + SPSchema + '].[' + ProcName + '] has WITH RECOMPILE in the stored procedure code, which may cause increased CPU usage due to constant recompiles of the code.',
68216821
CheckID = '78'
6822-
FROM #Recompile AS TR WHERE ProcName NOT LIKE 'sp_AllNightLog%' AND ProcName NOT LIKE 'sp_AskBrent%' AND ProcName NOT LIKE 'sp_Blitz%';
6822+
FROM #Recompile AS TR
6823+
WHERE ProcName NOT LIKE 'sp_AllNightLog%' AND ProcName NOT LIKE 'sp_AskBrent%' AND ProcName NOT LIKE 'sp_Blitz%'
6824+
AND DBName NOT IN ('master', 'model', 'msdb', 'tempdb');
68236825
DROP TABLE #Recompile;
68246826
END;
68256827

0 commit comments

Comments
 (0)