Skip to content

Commit 1c0bda6

Browse files
authored
Merge pull request #385 from BrentOzarULTD/dev
Version 2016-07.
2 parents 01e86f1 + 0b43694 commit 1c0bda6

File tree

8 files changed

+1195
-731
lines changed

8 files changed

+1195
-731
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
end_of_line = crlf
7+
charset = utf-8
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
insert_final_newline = false

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ First of all, welcome! We're excited that you'd like to contribute. How would yo
1010

1111
Everyone here is expected to abide by the [Contributor Covenant Code of Conduct](#the-contributor-covenant-code-of-conduct).
1212

13-
Wanna do something else, or have a question not answered here? Hop into Slack and ask us questions before you get started. [Join SQLServer.slack.com](https://sql-server-slack.herokuapp.com/), and we're in the [#FirstResponderKit channel](https://sqlserver.slack.com/messages/firstresponderkit/). We welcome newcomers, and there's always a way you can help.
13+
Wanna do something else, or have a question not answered here? Hop into Slack and ask us questions before you get started. [Get an invite to SQLCommunity.slack.com](https://sqlps.io/slack/), and we're in the [#FirstResponderKit channel](https://sqlcommunity.slack.com/messages/firstresponderkit/). We welcome newcomers, and there's always a way you can help.
1414

1515
## How to Report Bugs or Request Enhancements
1616

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ If you want to change anything about a check - the priority, finding, URL, or ID
3535
| 20 | Reliability | Databases in Unusual States | http://BrentOzar.com/go/repair | 102 |
3636
| 20 | Reliability | Memory Dumps Have Occurred | http://BrentOzar.com/go/dump | 171 |
3737
| 20 | Reliability | Plan Guides Failing | http://BrentOzar.com/go/guides | 164 |
38+
| 20 | Reliability | Query Store Cleanup Disabled | http://BrentOzar.com/go/cleanup | 182 |
3839
| 20 | Reliability | Unsupported Build of SQL Server | http://BrentOzar.com/go/unsupported | 128 |
3940
| 20 | Reliability | User Databases on C Drive | http://BrentOzar.com/go/cdrive | 26 |
4041
| 50 | Performance | Log File Growths Slow | http://BrentOzar.com/go/filegrowth | 151 |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ You're a DBA, sysadmin, or developer who manages Microsoft SQL Servers. It's you
1313

1414
To install, [download the latest release ZIP](https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/releases), then run the SQL files in the master database. (You can use other databases if you prefer.)
1515

16-
Only Microsoft-supported versions of SQL Server are supported here - sorry, 2005 and 2000. Some of these may work some of the time on 2005, but no promises, and don't file a support issue when they fail.
16+
Only Microsoft-supported versions of SQL Server are supported here - sorry, 2005 and 2000. Some of these may work some of the time on 2005, but no promises, and don't file a support issue when they fail. (For example, we know the output tables won't work on SQL 2005 because one of the output fields is a DATETIMEOFFSET datatype, which isn't available in 2005.)
1717

1818
## How to Get Support
1919

2020
Everyone here is expected to abide by the [Contributor Covenant Code of Conduct](CONTRIBUTING.md#the-contributor-covenant-code-of-conduct).
2121

22-
Want to talk to the developers? [Join SQLServer.slack.com](https://sql-server-slack.herokuapp.com/), and we're in the [#FirstResponderKit channel](https://sqlserver.slack.com/messages/firstresponderkit/).
22+
Want to talk to the developers? [Get an invite to SQLCommunity.slack.com](https://sqlps.io/slack/), and we're in the [#FirstResponderKit channel](https://sqlcommunity.slack.com/messages/firstresponderkit/).
2323

2424
Got a question? Ask it on [DBA.StackExchange.com](http://dba.stackexchange.com). Tag your question with the script name, like sp_Blitz, sp_BlitzCache, sp_BlitzIndex, etc, and we’ll be alerted of it right away.
2525

@@ -53,7 +53,7 @@ In addition to the [parameters common to many of the stored procedures](#paramet
5353
#### Writing sp_Blitz Output to a Table
5454

5555
```SQL
56-
sp_Blitz @OutputDatabaseName = 'DBAtools', @OutputSchemaName = 'dbo', @OutputDatabaseName = 'BlitzResults';
56+
sp_Blitz @OutputDatabaseName = 'DBAtools', @OutputSchemaName = 'dbo', @OutputTableName = 'BlitzResults';
5757
```
5858

5959
Checks for the existence of a table DBAtools.dbo.BlitzResults, creates it if necessary, then adds the output of sp_Blitz into this table. This table is designed to support multiple outputs from multiple servers, so you can track your server's configuration history over time.

sp_Blitz.sql

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ALTER PROCEDURE [dbo].[sp_Blitz]
2929
AS
3030
SET NOCOUNT ON;
3131
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
32-
SET @VersionDate = '20160626'
32+
SET @VersionDate = '20160715'
3333

3434
IF @Help = 1 PRINT '
3535
/*
@@ -53,6 +53,17 @@ AS
5353
Unknown limitations of this version:
5454
- None. (If we knew them, they would be known. Duh.)
5555
56+
Changes in v53.1 - 2016/07/15
57+
- Warn about 2016 Query Store cleanup bug in Standard, Evaluation, Express:
58+
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/352
59+
- Updating list of supported SQL Server versions:
60+
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/344
61+
- Fixing bug in wait stats percentages:
62+
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/324
63+
- For the full list of improvements and fixes in this version, see:
64+
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/milestone/3?closed=1
65+
66+
5667
Changes in v53 - 2016/06/26
5768
- BREAKING CHANGE: Standardized input & output parameters to be
5869
consistent across the entire First Responder Kit. This also means the old
@@ -64,38 +75,6 @@ AS
6475
when servers are in different data centers, different time zones. More info:
6576
https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/288
6677
67-
Changes in v52 - 2016/06/02
68-
- SQL Server 2016 compatibility. 2016 RTM ships with some questionable
69-
database-level options like heaps in DWDiagnostics, target recovery
70-
time changed in the DW* databases, and l_certSignSmDetach as a new
71-
default sysadmin login, so ignoring those.
72-
- If databases have an old compatibility level that does not support CTEs
73-
then @CheckUserDatabaseObjects is set to 0 to avoid problems with
74-
current checks. Get on the current compat level, Grandpa.
75-
76-
Changes in v51 - 2016/05/18
77-
- Thomas Rushton added a check for dangerous third-party modules. (179)
78-
More info: https://support.microsoft.com/en-us/kb/2033238
79-
- New check for snapshot backups possibly freezing IO. Looking for 50GB+
80-
backups that complete in under 60 seconds. (178)
81-
- If there are 50+ user databases, you have to turn on @BringThePain = 1
82-
in order to do @CheckUserDatabaseObjects = 1. (Speeds up sp_Blitz on
83-
servers with hundreds or thousands of databases.)
84-
- Reprioritized a bunch of checks, like moving security warnings down to
85-
priority 230, so that you can use @IgnorePrioritiesAbove = 50 better.
86-
- Bug fixes.
87-
88-
Changes in v50 - 2016/04/08
89-
- Fixed bug in check ID 2 that would fail on a database with multiple log
90-
files, that also has not had a backup in two weeks.
91-
92-
Changes in v49 - 2016/04/06
93-
- Amazon RDS compatibility, but to do that, we have to skip a bunch of checks.
94-
RDS does not allow you to query MSDB, configure TempDB, make
95-
server-level sp_configure settings, etc.
96-
97-
For prior changes, see: http://www.BrentOzar.com/blitz/changelog/
98-
9978
10079
Parameter explanations:
10180
@@ -2686,9 +2665,9 @@ AS
26862665
BEGIN
26872666

26882667
IF (@ProductVersionMajor = 12 AND @ProductVersionMinor < 2000) OR
2689-
(@ProductVersionMajor = 11 AND @ProductVersionMinor <= 2100) OR
2690-
(@ProductVersionMajor = 10.5 AND @ProductVersionMinor <= 6000) OR
2691-
(@ProductVersionMajor = 10 AND @ProductVersionMinor <= 6000) OR
2668+
(@ProductVersionMajor = 11 AND @ProductVersionMinor < 3000) OR
2669+
(@ProductVersionMajor = 10.5 AND @ProductVersionMinor < 6000) OR
2670+
(@ProductVersionMajor = 10 AND @ProductVersionMinor < 6000) OR
26922671
(@ProductVersionMajor = 9 /*AND @ProductVersionMinor <= 5000*/)
26932672
BEGIN
26942673
INSERT INTO #BlitzResults(CheckID, Priority, FindingsGroup, Finding, URL, Details)
@@ -3614,6 +3593,32 @@ IF @ProductVersionMajor >= 10 AND @ProductVersionMinor >= 50
36143593
FROM [?].sys.database_query_store_options WHERE desired_state = 0 AND ''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'')';
36153594
END
36163595

3596+
IF NOT EXISTS ( SELECT 1
3597+
FROM #SkipChecks
3598+
WHERE DatabaseName IS NULL AND CheckID = 182 )
3599+
AND EXISTS(SELECT * FROM sys.all_objects WHERE name = 'database_query_store_options')
3600+
AND CAST(SERVERPROPERTY('edition') AS VARCHAR(100)) NOT LIKE '%Enterprise%'
3601+
AND CAST(SERVERPROPERTY('edition') AS VARCHAR(100)) NOT LIKE '%Developer%'
3602+
BEGIN
3603+
EXEC dbo.sp_MSforeachdb 'USE [?];
3604+
INSERT INTO #BlitzResults
3605+
(CheckID,
3606+
DatabaseName,
3607+
Priority,
3608+
FindingsGroup,
3609+
Finding,
3610+
URL,
3611+
Details)
3612+
SELECT TOP 1 182,
3613+
''?'',
3614+
20,
3615+
''Reliability'',
3616+
''Query Store Cleanup Disabled'',
3617+
''http://BrentOzar.com/go/cleanup'',
3618+
(''SQL 2016 RTM has a bug involving dumps that happen every time Query Store cleanup jobs run.'')
3619+
FROM [?].sys.database_query_store_options WHERE desired_state <> 0 AND ''?'' NOT IN (''master'', ''model'', ''msdb'', ''tempdb'', ''DWConfiguration'', ''DWDiagnostics'', ''DWQueue'', ''ReportServer'', ''ReportServerTempDB'')';
3620+
END
3621+
36173622

36183623
IF NOT EXISTS ( SELECT 1
36193624
FROM #SkipChecks
@@ -5509,10 +5514,10 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
55095514
,'http://BrentOzar.com/go/waits' AS URL
55105515
, Details = CAST(CAST(SUM(os.wait_time_ms / 1000.0 / 60 / 60) OVER (PARTITION BY os.wait_type) AS NUMERIC(18,1)) AS NVARCHAR(20)) + N' hours of waits, ' +
55115516
CAST(CAST((SUM(60.0 * os.wait_time_ms) OVER (PARTITION BY os.wait_type) ) / @MSSinceStartup AS NUMERIC(18,1)) AS NVARCHAR(20)) + N' minutes average wait time per hour, ' +
5512-
CAST(CAST(
5517+
/* CAST(CAST(
55135518
100.* SUM(os.wait_time_ms) OVER (PARTITION BY os.wait_type)
55145519
/ (1. * SUM(os.wait_time_ms) OVER () )
5515-
AS NUMERIC(18,1)) AS NVARCHAR(40)) + N'% of waits, ' +
5520+
AS NUMERIC(18,1)) AS NVARCHAR(40)) + N'% of waits, ' + */
55165521
CAST(CAST(
55175522
100. * SUM(os.signal_wait_time_ms) OVER (PARTITION BY os.wait_type)
55185523
/ (1. * SUM(os.wait_time_ms) OVER ())

0 commit comments

Comments
 (0)