You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/sp_Blitz_Checks_by_Priority.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
6
6
7
7
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.
FROM fn_my_permissions(N'sys.traces', N'OBJECT') AS fmp
291
-
WHERE fmp.permission_name = N'ALTER'
290
+
FROM fn_my_permissions(NULL, NULL) AS fmp
291
+
WHERE fmp.permission_name = N'ALTER TRACE'
292
292
)
293
293
BEGIN
294
294
SET @SkipTrace = 1;
@@ -7049,7 +7049,7 @@ IF @ProductVersionMajor >= 10
7049
7049
''File Configuration'' AS FindingsGroup,
7050
7050
''File growth set to percent'',
7051
7051
''https://www.brentozar.com/go/percentgrowth'' AS URL,
7052
-
''The ['' + DB_NAME() + ''] database file '' + f.physical_name + '' has grown to '' + CONVERT(NVARCHAR(10), CONVERT(NUMERIC(38, 2), (f.size / 128.) / 1024.)) + '' GB, and is using percent filegrowth settings. This can lead to slow performance during growths if Instant File Initialization is not enabled.''
7052
+
''The ['' + DB_NAME() + ''] database file '' + f.physical_name + '' has grown to '' + CONVERT(NVARCHAR(20), CONVERT(NUMERIC(38, 2), (f.size / 128.) / 1024.)) + '' GB, and is using percent filegrowth settings. This can lead to slow performance during growths if Instant File Initialization is not enabled.''
7053
7053
FROM [?].sys.database_files f
7054
7054
WHERE is_percent_growth = 1 and size > 128000 OPTION (RECOMPILE);';
7055
7055
END;
@@ -8617,7 +8617,7 @@ IF @ProductVersionMajor >= 10
8617
8617
SELECT 162 AS CheckID ,
8618
8618
50 AS Priority ,
8619
8619
'Performance' AS FindingGroup ,
8620
-
'Poison Wait Detected: CMEMTHREAD & NUMA' AS Finding ,
8620
+
'Poison Wait Detected: CMEMTHREAD and NUMA' AS Finding ,
8621
8621
'https://www.brentozar.com/go/poison' AS URL ,
8622
8622
CONVERT(VARCHAR(10), (MAX([wait_time_ms]) / 1000) / 86400) + ':' + CONVERT(VARCHAR(20), DATEADD(s, (MAX([wait_time_ms]) / 1000), 0), 108) + ' of this wait have been recorded'
8623
8623
+ CASE WHEN ts.status = 1 THEN ' despite enabling trace flag 8048 already.'
@@ -9970,6 +9970,36 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
9970
9970
END;
9971
9971
END; /* CheckID 261 */
9972
9972
9973
+
9974
+
IF NOT EXISTS ( SELECT 1
9975
+
FROM #SkipChecks
9976
+
WHERE DatabaseName IS NULL AND CheckID = 266 )
9977
+
BEGIN
9978
+
INSERT INTO #BlitzResults
9979
+
( CheckID ,
9980
+
Priority ,
9981
+
FindingsGroup ,
9982
+
Finding ,
9983
+
URL ,
9984
+
Details
9985
+
)
9986
+
SELECT 266 AS CheckID ,
9987
+
250 AS Priority ,
9988
+
'Server Info' AS FindingsGroup ,
9989
+
'Hardware - Memory Counters' AS Finding ,
9990
+
'https://www.brentozar.com/go/target' AS URL ,
9991
+
N'Target Server Memory (GB): ' + CAST((CAST((pTarget.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100))
9992
+
+ N' Total Server Memory (GB): ' + CAST((CAST((pTotal.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100))
9993
+
FROM sys.dm_os_performance_counters pTarget
9994
+
INNER JOIN sys.dm_os_performance_counters pTotal
9995
+
ON pTotal.object_name LIKE 'SQLServer:Memory Manager%'
9996
+
AND pTotal.counter_name LIKE 'Total Server Memory (KB)%'
9997
+
WHERE pTarget.object_name LIKE 'SQLServer:Memory Manager%'
9998
+
AND pTarget.counter_name LIKE 'Target Server Memory (KB)%'
9999
+
END
10000
+
10001
+
10002
+
9973
10003
END; /* IF @CheckServerInfo = 1 */
9974
10004
END; /* IF ( ( SERVERPROPERTY('ServerName') NOT IN ( SELECT ServerName */
@@ -20534,6 +20564,7 @@ IF OBJECT_ID('dbo.sp_BlitzIndex') IS NULL
20534
20564
GO
20535
20565
20536
20566
ALTER PROCEDURE dbo.sp_BlitzIndex
20567
+
@ObjectName NVARCHAR(386) = NULL, /* 'dbname.schema.table' -- if you are lazy and want to fill in @DatabaseName, @SchemaName and @TableName, and since it's the first parameter can simply do: sp_BlitzIndex 'sch.table' */
20537
20568
@DatabaseName NVARCHAR(128) = NULL, /*Defaults to current DB if not specified*/
20538
20569
@SchemaName NVARCHAR(128) = NULL, /*Requires table_name as well.*/
20539
20570
@TableName NVARCHAR(128) = NULL, /*Requires schema_name as well.*/
@@ -13519,6 +13519,7 @@ IF OBJECT_ID('dbo.sp_BlitzIndex') IS NULL
13519
13519
GO
13520
13520
13521
13521
ALTER PROCEDURE dbo.sp_BlitzIndex
13522
+
@ObjectName NVARCHAR(386) = NULL, /* 'dbname.schema.table' -- if you are lazy and want to fill in @DatabaseName, @SchemaName and @TableName, and since it's the first parameter can simply do: sp_BlitzIndex 'sch.table' */
13522
13523
@DatabaseName NVARCHAR(128) = NULL, /*Defaults to current DB if not specified*/
13523
13524
@SchemaName NVARCHAR(128) = NULL, /*Requires table_name as well.*/
13524
13525
@TableName NVARCHAR(128) = NULL, /*Requires schema_name as well.*/
0 commit comments