Skip to content

Commit 6c3b1cc

Browse files
CopilotBrentOzar
andauthored
Update TempDB data file warning threshold and wording
Agent-Logs-Url: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/sessions/38caff71-fd4e-4c35-843b-7cf1fe8b131c Co-authored-by: BrentOzar <245462+BrentOzar@users.noreply.github.com>
1 parent d4304c3 commit 6c3b1cc

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

Documentation/sp_Blitz_Checks_by_Priority.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ If you want to add a new one, start at 276.
135135
| 170 | File Configuration | Multiple Log Files on One Drive | https://www.BrentOzar.com/go/manylogs | 41 |
136136
| 170 | File Configuration | System Database on C Drive | https://www.BrentOzar.com/go/drivec | 24 |
137137
| 170 | File Configuration | TempDB Governor Config Problem | https://www.BrentOzar.com/go/tempdbrg | 271 |
138-
| 170 | File Configuration | TempDB Has >16 Data Files | https://www.BrentOzar.com/go/tempdb | 175 |
138+
| 170 | File Configuration | TempDB Has a Lot of Data Files | https://www.BrentOzar.com/go/tempdb | 175 |
139139
| 170 | File Configuration | TempDB Only Has 1 Data File | https://www.BrentOzar.com/go/tempdb | 40 |
140140
| 170 | File Configuration | TempDB Unevenly Sized Data Files | https://www.BrentOzar.com/go/tempdb | 183 |
141141
| 170 | File Configuration | Uneven File Growth Settings in One Filegroup | https://www.BrentOzar.com/go/grow | 42 |

Install-All-Scripts.sql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5792,12 +5792,14 @@ IF NOT EXISTS ( SELECT 1
57925792
'TempDB' AS DatabaseName ,
57935793
170 AS Priority ,
57945794
'File Configuration' AS FindingsGroup ,
5795-
'TempDB Has >16 Data Files' AS Finding ,
5795+
'TempDB Has a Lot of Data Files' AS Finding ,
57965796
'https://www.brentozar.com/go/tempdb' AS URL ,
5797-
'Woah, Nelly! TempDB has ' + CAST(COUNT_BIG(*) AS VARCHAR(30)) + '. Did you forget to terminate a loop somewhere?' AS Details
5797+
'This server has ' + CAST(si.cpu_count AS VARCHAR(30)) + ' cores and ' + CAST(COUNT_BIG(*) AS VARCHAR(30)) + ' TempDB data files.' AS Details
57985798
FROM sys.[master_files] AS [mf]
5799+
CROSS JOIN sys.dm_os_sys_info AS [si]
57995800
WHERE [mf].[database_id] = 2 AND [mf].[type] = 0
5800-
HAVING COUNT_BIG(*) > 16;
5801+
HAVING COUNT_BIG(*) > 8
5802+
AND COUNT_BIG(*) * 2 > MAX([si].[cpu_count]);
58015803
END;
58025804

58035805
IF NOT EXISTS ( SELECT 1

sp_Blitz.sql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5792,12 +5792,14 @@ IF NOT EXISTS ( SELECT 1
57925792
'TempDB' AS DatabaseName ,
57935793
170 AS Priority ,
57945794
'File Configuration' AS FindingsGroup ,
5795-
'TempDB Has >16 Data Files' AS Finding ,
5795+
'TempDB Has a Lot of Data Files' AS Finding ,
57965796
'https://www.brentozar.com/go/tempdb' AS URL ,
5797-
'Woah, Nelly! TempDB has ' + CAST(COUNT_BIG(*) AS VARCHAR(30)) + '. Did you forget to terminate a loop somewhere?' AS Details
5797+
'This server has ' + CAST(si.cpu_count AS VARCHAR(30)) + ' cores and ' + CAST(COUNT_BIG(*) AS VARCHAR(30)) + ' TempDB data files.' AS Details
57985798
FROM sys.[master_files] AS [mf]
5799+
CROSS JOIN sys.dm_os_sys_info AS [si]
57995800
WHERE [mf].[database_id] = 2 AND [mf].[type] = 0
5800-
HAVING COUNT_BIG(*) > 16;
5801+
HAVING COUNT_BIG(*) > 8
5802+
AND COUNT_BIG(*) * 2 > MAX([si].[cpu_count]);
58015803
END;
58025804

58035805
IF NOT EXISTS ( SELECT 1

0 commit comments

Comments
 (0)