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
sp_AllNightLog, sp_AllNightLog_Setup, sp_BlitzInMemoryOLTP, and sp_BlitzQueryStore are no longer maintained. They may still work, but no guarantees. Please don't submit issues or pull requests to change them. You're welcome to fork the code and build your own supported version, of course, since they're open source.
2
2
3
-
They are no longer maintained or updated.
4
-
5
-
Don't use 'em on SQL Server 2008 or newer - these are only for folks who still
6
-
need to manage SQL Server 2005.
3
+
The other files in this folder are older versions of the First Responder Kit that work with versions of Microsoft SQL Server that Microsoft themselves no longer support. If you're cursed enough to work with antiques like SQL Server 2012, 2008, or heaven forbid, 2005, you may still be able to get value out of these, but we don't support the scripts anymore either.
Copy file name to clipboardExpand all lines: Documentation/sp_Blitz_Checks_by_Priority.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
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.
-[Parameters Common to Many of the Stored Procedures](#parameters-common-to-many-of-the-stored-procedures)
31
30
-[License MIT](#license)
@@ -42,7 +41,7 @@ To install, [download the latest release ZIP](https://github.com/BrentOzarULTD/S
42
41
The First Responder Kit runs on:
43
42
44
43
* SQL Server on Windows - all versions that Microsoft supports. For end of support dates, check out the "Support Ends" column at https://sqlserverupdates.com.
45
-
* SQL Server on Linux - yes, fully supported except sp_AllNightLog and sp_DatabaseRestore, which require xp_cmdshell, which Microsoft doesn't provide on Linux.
44
+
* SQL Server on Linux - yes, fully supported except sp_DatabaseRestore, which require xp_cmdshell, which Microsoft doesn't provide on Linux.
46
45
* Amazon RDS SQL Server - fully supported.
47
46
* Azure SQL DB - not supported. Some of the procedures work, but some don't, and Microsoft has a tendency to change DMVs in Azure without warning, so we don't put any effort into supporting it. If it works, great! If not, any changes to make it work would be on you. [See the contributing.md file](CONTRIBUTING.md) for how to do that.
48
47
@@ -275,7 +274,6 @@ sp_BlitzIndex focuses on mainstream index types. Other index types have varying
Copy file name to clipboardExpand all lines: sp_Blitz.sql
+54Lines changed: 54 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,7 @@ AS
155
155
,@MinServerMemory bigint
156
156
,@MaxServerMemory bigint
157
157
,@ColumnStoreIndexesInUse bit
158
+
,@QueryStoreInUse bit
158
159
,@TraceFileIssue bit
159
160
-- Flag for Windows OS to help with Linux support
160
161
,@IsWindowsOperatingSystem BIT
@@ -6758,6 +6759,37 @@ IF @ProductVersionMajor >= 10
6758
6759
AND N''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'') OPTION (RECOMPILE)';
(''The new SQL Server 2017 Query Store feature for tracking wait stats has not been enabled on this database. It is very useful for tracking wait stats at a query level.'')
6788
+
FROM [?].sys.database_query_store_options
6789
+
WHERE desired_state <> 0
6790
+
AND wait_stats_capture_mode = 0
6791
+
OPTION (RECOMPILE)';
6792
+
END;
6761
6793
6762
6794
IF @ProductVersionMajor =13AND @ProductVersionMinor <2149--2016 CU1 has the fix in it
6763
6795
ANDNOTEXISTS ( SELECT1
@@ -7587,6 +7619,20 @@ IF @ProductVersionMajor >= 10
7587
7619
IFEXISTS (SELECT*FROM #TemporaryDatabaseResults) SET @ColumnStoreIndexesInUse =1;
7588
7620
END;
7589
7621
7622
+
/* Check if Query Store is in use - for Github issue #3527 */
7623
+
IFNOTEXISTS ( SELECT1
7624
+
FROM #SkipChecks
7625
+
WHERE DatabaseName ISNULLAND CheckID =74 ) /* Trace flags */
7626
+
AND @ProductVersionMajor >12/* The relevant column only exists in versions that support Query store */
7627
+
BEGIN
7628
+
TRUNCATETABLE #TemporaryDatabaseResults;
7629
+
7630
+
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 74) WITHNOWAIT;
7631
+
7632
+
EXECdbo.sp_MSforeachdb'USE [?]; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; IF EXISTS(SELECT * FROM sys.databases WHERE is_query_store_on = 1) INSERT INTO #TemporaryDatabaseResults (DatabaseName, Finding) VALUES (DB_NAME(), ''Yup'') OPTION (RECOMPILE);';
7633
+
IFEXISTS (SELECT*FROM #TemporaryDatabaseResults) SET @QueryStoreInUse =1;
CASEWHEN [T].[TraceFlag] ='652'THEN'652 enabled globally, which disables pre-fetching during index scans. This is usually a very bad idea.'
@@ -8372,6 +8419,13 @@ IF @ProductVersionMajor >= 10
8372
8419
WHEN [T].[TraceFlag] ='3226'THEN'3226 enabled globally, which keeps the event log clean by not reporting successful backups.'
8373
8420
WHEN [T].[TraceFlag] ='3505'THEN'3505 enabled globally, which disables Checkpoints. This is usually a very bad idea.'
8374
8421
WHEN [T].[TraceFlag] ='4199'THEN'4199 enabled globally, which enables non-default Query Optimizer fixes, changing query plans from the default behaviors.'
8422
+
WHEN [T].[TraceFlag] ='7745'AND @ProductVersionMajor >12AND @QueryStoreInUse =1THEN'7745 enabled globally, which makes shutdowns/failovers quicker by not waiting for Query Store to flush to disk. This good idea loses you the non-flused Query Store data.'
8423
+
WHEN [T].[TraceFlag] ='7745'AND @ProductVersionMajor >12THEN'7745 enabled globally, which is for Query Store. None of your databases have Query Store enabled, so why do you have this turned on?'
8424
+
WHEN [T].[TraceFlag] ='7745'AND @ProductVersionMajor <=12THEN'7745 enabled globally, which is for Query Store. Query Store does not exist on your SQL Server version, so why do you have this turned on?'
8425
+
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor >14THEN'7752 enabled globally, which is for Query Store. However, it has no effect in your SQL Server version. Consider turning it off.'
8426
+
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor >12AND @QueryStoreInUse =1THEN'7752 enabled globally, which stops queries needing to wait on Query Store loading up after database recovery.'
8427
+
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor >12THEN'7752 enabled globally, which is for Query Store. None of your databases have Query Store enabled, so why do you have this turned on?'
8428
+
WHEN [T].[TraceFlag] ='7752'AND @ProductVersionMajor <=12THEN'7752 enabled globally, which is for Query Store. Query Store does not exist on your SQL Server version, so why do you have this turned on?'
8375
8429
WHEN [T].[TraceFlag] ='8048'THEN'8048 enabled globally, which tries to reduce CMEMTHREAD waits on servers with a lot of logical processors.'
8376
8430
WHEN [T].[TraceFlag] ='8017'AND (CAST(SERVERPROPERTY('Edition') ASNVARCHAR(1000)) LIKEN'%Express%') THEN'8017 is enabled globally, but this is the default for Express Edition.'
8377
8431
WHEN [T].[TraceFlag] ='8017'AND (CAST(SERVERPROPERTY('Edition') ASNVARCHAR(1000)) NOTLIKEN'%Express%') THEN'8017 is enabled globally, which disables the creation of schedulers for all logical processors.'
0 commit comments