Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Documentation/sp_Blitz_Checks_by_Priority.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav

If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.

CURRENT HIGH CHECKID: 271.
If you want to add a new one, start at 272.
CURRENT HIGH CHECKID: 272.
If you want to add a new one, start at 273.

| Priority | FindingsGroup | Finding | URL | CheckID |
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
Expand Down Expand Up @@ -87,6 +87,7 @@ If you want to add a new one, start at 272.
| 100 | Performance | Many Plans for One Query | https://www.BrentOzar.com/go/parameterization | 160 |
| 100 | Performance | Max Memory Set Too High | https://www.BrentOzar.com/go/max | 50 |
| 100 | Performance | Memory Pressure Affecting Queries | https://www.BrentOzar.com/go/grants | 117 |
| 100 | Performance | Optimized Locking Not Fully Set Up | https://www.BrentOzar.com/go/optimizedlocking | 272 |
| 100 | Performance | Partitioned database with non-aligned indexes | https://www.BrentOzar.com/go/aligned | 72 |
| 100 | Performance | Repetitive Maintenance Tasks | https://ola.hallengren.com | 181 |
| 100 | Performance | Resource Governor Enabled | https://www.BrentOzar.com/go/rg | 10 |
Expand Down
29 changes: 29 additions & 0 deletions sp_Blitz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4935,6 +4935,35 @@ AS
CLOSE DatabaseDefaultsLoop;
DEALLOCATE DatabaseDefaultsLoop;

/* CheckID 272 - Performance - Optimized Locking Not Fully Set Up */
IF EXISTS (SELECT * FROM sys.all_columns WHERE name = 'is_optimized_locking_on' AND object_id = OBJECT_ID('sys.databases'))
AND NOT EXISTS ( SELECT 1
FROM #SkipChecks
WHERE DatabaseName IS NULL AND CheckID = 272 )
BEGIN
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 272) WITH NOWAIT;

INSERT INTO [#BlitzResults]
( [CheckID] ,
[Priority] ,
[FindingsGroup] ,
[Finding] ,
[DatabaseName] ,
[URL] ,
[Details] )

SELECT
272 AS [CheckID] ,
100 AS [Priority] ,
'Performance' AS [FindingsGroup] ,
'Optimized Locking Not Fully Set Up' AS [Finding] ,
name,
'https://www.brentozar.com/go/optimizedlocking' AS [URL] ,
'RCSI should be enabled on this database to get the full benefits of optimized locking.' AS [Details]
FROM sys.databases
WHERE is_optimized_locking_on = 1 AND is_read_committed_snapshot_on = 0;
END;

/* Check if target recovery interval <> 60 */
IF
@ProductVersionMajor >= 10
Expand Down
Loading