Skip to content

Commit 9fad7bb

Browse files
Merge pull request BrentOzarULTD#1 from BrentOzarULTD/master
Pulling updates from Brent
2 parents 9bdd9a8 + 01e86f1 commit 9fad7bb

File tree

7 files changed

+70
-54
lines changed

7 files changed

+70
-54
lines changed

Documentation/sp_AskBrent Checks by Priority.md renamed to Documentation/sp_BlitzFirst Checks by Priority.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sp_AskBrent Checks by Priority
1+
# sp_BlitzFirst Checks by Priority
22

33
This table lists all checks ordered by priority.
44

@@ -34,4 +34,4 @@ If you want to change anything about a check - the priority, finding, URL, or ID
3434
| 250 | Server Info | Wait Time per Core per Second | http://BrentOzar.com/go/measure | 20 |
3535
| 251 | Server Info | CPU Utilization | | 23 |
3636
| 251 | Server Info | Database Count | | 22 |
37-
| 251 | Server Info | Database Size, Total GB | | 21 |
37+
| 251 | Server Info | Database Size, Total GB | | 21 |

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# SQL Server First Responder Kit
2+
[![licence badge]][licence]
3+
[![stars badge]][stars]
4+
[![forks badge]][forks]
5+
[![issues badge]][issues]
26

37
You're a DBA, sysadmin, or developer who manages Microsoft SQL Servers. It's your fault if they're down or slow. These tools help you understand what's going on in your server.
48

59
* When you want an overall health check, run [sp_Blitz](#sp_blitz-overall-health-check).
610
* To learn which queries have been using the most resources, run [sp_BlitzCache](#sp_blitzcache-find-the-most-resource-intensive-queries).
711
* To analyze which indexes are missing or slowing you down, run [sp_BlitzIndex](#sp_blitzindex-tune-your-indexes).
8-
* To find out why the server is slow right now, run [sp_AskBrent](#sp_askbrent-real-time-performance-advice).
12+
* To find out why the server is slow right now, run [sp_BlitzFirst](#sp_blitzfirst-real-time-performance-advice).
913

1014
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.)
1115

@@ -95,13 +99,13 @@ In addition to the [parameters common to many of the stored procedures](#paramet
9599

96100
(stub - describe the lesser-used stuff)
97101

98-
## sp_AskBrent: Real-Time Performance Advice
102+
## sp_BlitzFirst: Real-Time Performance Advice
99103

100104
(stub - describe the big picture here)
101105

102-
### Advanced sp_AskBrent Parameters
106+
### Advanced sp_BlitzFirst Parameters
103107

104-
In addition to the [parameters common to many of the stored procedures](#parameters-common-to-many-of-the-stored-procedures), here are the ones specific to sp_AskBrent:
108+
In addition to the [parameters common to many of the stored procedures](#parameters-common-to-many-of-the-stored-procedures), here are the ones specific to sp_BlitzFirst:
105109

106110
(stub - describe the lesser-used stuff)
107111

@@ -115,3 +119,14 @@ In addition to the [parameters common to many of the stored procedures](#paramet
115119
## License
116120

117121
[The SQL Server First Responder Kit uses the MIT License.](LICENSE.md)
122+
123+
124+
[licence badge]:https://img.shields.io/badge/license-MIT-blue.svg
125+
[stars badge]:https://img.shields.io/github/stars/BrentOzarULTD/SQL-Server-First-Responder-Kit.svg
126+
[forks badge]:https://img.shields.io/github/forks/BrentOzarULTD/SQL-Server-First-Responder-Kit.svg
127+
[issues badge]:https://img.shields.io/github/issues/BrentOzarULTD/SQL-Server-First-Responder-Kit.svg
128+
129+
[licence]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/master/LICENSE.md
130+
[stars]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/stargazers
131+
[forks]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/network
132+
[issues]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues

sp_Blitz.sql

Lines changed: 2 additions & 2 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 = '20160602'
32+
SET @VersionDate = '20160626'
3333

3434
IF @Help = 1 PRINT '
3535
/*
@@ -53,7 +53,7 @@ AS
5353
Unknown limitations of this version:
5454
- None. (If we knew them, they would be known. Duh.)
5555
56-
Changes in v53 - YYYY/MM/DD
56+
Changes in v53 - 2016/06/26
5757
- BREAKING CHANGE: Standardized input & output parameters to be
5858
consistent across the entire First Responder Kit. This also means the old
5959
old output parameter @Version is no more, because we are switching to

sp_BlitzCache.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Known limitations of this version:
188188
Unknown limitations of this version:
189189
- May or may not be vulnerable to the wick effect.
190190
191-
Changes in v3.0 - 2016/06/18:
191+
Changes in v3.0 - 2016/06/26:
192192
- BREAKING CHANGE: Standardized input & output parameters to be
193193
consistent across the entire First Responder Kit. This also means the old
194194
old output parameter @Version is no more, because we are switching to

sp_AskBrent.sql renamed to sp_BlitzFirst.sql

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
IF OBJECT_ID('dbo.sp_AskBrent') IS NULL
2-
EXEC ('CREATE PROCEDURE dbo.sp_AskBrent AS RETURN 0;')
1+
IF OBJECT_ID('dbo.sp_BlitzFirst') IS NULL
2+
EXEC ('CREATE PROCEDURE dbo.sp_BlitzFirst AS RETURN 0;')
33
GO
44

55

6-
ALTER PROCEDURE [dbo].[sp_AskBrent]
6+
ALTER PROCEDURE [dbo].[sp_BlitzFirst]
77
@Question NVARCHAR(MAX) = NULL ,
88
@Help TINYINT = 0 ,
99
@AsOf DATETIMEOFFSET = NULL ,
@@ -28,10 +28,10 @@ AS
2828
BEGIN
2929
SET NOCOUNT ON;
3030
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
31-
SET @VersionDate = '20160615'
31+
SET @VersionDate = '20160626'
3232

3333
IF @Help = 1 PRINT '
34-
sp_AskBrent from http://FirstResponderKit.org
34+
sp_BlitzFirst from http://FirstResponderKit.org
3535
3636
This script gives you a prioritized list of why your SQL Server is slow right now.
3737
@@ -53,7 +53,8 @@ Known limitations of this version:
5353
Unknown limitations of this version:
5454
- None. Like Zombo.com, the only limit is yourself.
5555
56-
Changes in v24 - YYYY/MM/DD
56+
Changes in v24 - 2016/06/26
57+
- Renamed from sp_AskBrent.
5758
- BREAKING CHANGE: Standardized input & output parameters to be
5859
consistent across the entire First Responder Kit. This also means the old
5960
old output parameter @Version is no more, because we are switching to
@@ -301,7 +302,7 @@ BEGIN
301302
checks, we insert data into this table, and we manually put in the CheckID.
302303
We (Brent Ozar Unlimited) maintain a list of the checks by ID#. You can
303304
download that from http://FirstResponderKit.org if you want to build
304-
a tool that relies on the output of sp_AskBrent.
305+
a tool that relies on the output of sp_BlitzFirst.
305306
*/
306307

307308
IF OBJECT_ID('tempdb..#AskBrentResults') IS NOT NULL
@@ -1021,7 +1022,7 @@ BEGIN
10211022
/* If we're waiting less than 30 seconds, run this check now rather than wait til the end.
10221023
We get this data from the ring buffers, and it's only updated once per minute, so might
10231024
as well get it now - whereas if we're checking 30+ seconds, it might get updated by the
1024-
end of our sp_AskBrent session. */
1025+
end of our sp_BlitzFirst session. */
10251026
INSERT INTO #AskBrentResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL)
10261027
SELECT 24, 50, 'Server Performance', 'High CPU Utilization', CAST(100 - SystemIdle AS NVARCHAR(20)) + N'%. Ring buffer details: ' + CAST(record AS NVARCHAR(4000)), 100 - SystemIdle, 'http://www.BrentOzar.com/go/cpu'
10271028
FROM (
@@ -1579,7 +1580,7 @@ BEGIN
15791580
/* If we're waiting 30+ seconds, run this check at the end.
15801581
We get this data from the ring buffers, and it's only updated once per minute, so might
15811582
as well get it now - whereas if we're checking 30+ seconds, it might get updated by the
1582-
end of our sp_AskBrent session. */
1583+
end of our sp_BlitzFirst session. */
15831584
INSERT INTO #AskBrentResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL)
15841585
SELECT 24, 50, 'Server Performance', 'High CPU Utilization', CAST(100 - SystemIdle AS NVARCHAR(20)) + N'%. Ring buffer details: ' + CAST(record AS NVARCHAR(4000)), 100 - SystemIdle, 'http://www.BrentOzar.com/go/cpu'
15851586
FROM (
@@ -1662,13 +1663,13 @@ BEGIN
16621663
)
16631664
VALUES ( -1 ,
16641665
0 ,
1665-
'sp_AskBrent ' + CAST(CONVERT(DATETIMEOFFSET, @VersionDate, 102) AS VARCHAR(100)),
1666+
'sp_BlitzFirst ' + CAST(CONVERT(DATETIMEOFFSET, @VersionDate, 102) AS VARCHAR(100)),
16661667
'From Your Community Volunteers' ,
16671668
'http://FirstResponderKit.org/' ,
16681669
'We hope you found this tool useful.'
16691670
);
16701671

1671-
/* Outdated sp_AskBrent - sp_AskBrent is Over 6 Months Old */
1672+
/* Outdated sp_BlitzFirst - sp_BlitzFirst is Over 6 Months Old */
16721673
IF DATEDIFF(MM, @VersionDate, SYSDATETIMEOFFSET()) > 6
16731674
BEGIN
16741675
INSERT INTO #AskBrentResults
@@ -1681,10 +1682,10 @@ BEGIN
16811682
)
16821683
SELECT 27 AS CheckID ,
16831684
0 AS Priority ,
1684-
'Outdated sp_AskBrent' AS FindingsGroup ,
1685-
'sp_AskBrent is Over 6 Months Old' AS Finding ,
1685+
'Outdated sp_BlitzFirst' AS FindingsGroup ,
1686+
'sp_BlitzFirst is Over 6 Months Old' AS Finding ,
16861687
'http://FirstResponderKit.org/' AS URL ,
1687-
'Some things get better with age, like fine wine and your T-SQL. However, sp_AskBrent is not one of those things - time to go download the current one.' AS Details
1688+
'Some things get better with age, like fine wine and your T-SQL. However, sp_BlitzFirst is not one of those things - time to go download the current one.' AS Details
16881689
END
16891690

16901691

@@ -2604,20 +2605,20 @@ GO
26042605

26052606

26062607
/* How to run it:
2607-
EXEC dbo.sp_AskBrent
2608+
EXEC dbo.sp_BlitzFirst
26082609
26092610
With extra diagnostic info:
2610-
EXEC dbo.sp_AskBrent @ExpertMode = 1;
2611+
EXEC dbo.sp_BlitzFirst @ExpertMode = 1;
26112612
26122613
In Ask a Question mode:
2613-
EXEC dbo.sp_AskBrent 'Is this cursor bad?';
2614+
EXEC dbo.sp_BlitzFirst 'Is this cursor bad?';
26142615
26152616
Saving output to tables:
2616-
EXEC sp_AskBrent @Seconds = 60
2617+
EXEC sp_BlitzFirst @Seconds = 60
26172618
, @OutputDatabaseName = 'DBAtools'
26182619
, @OutputSchemaName = 'dbo'
2619-
, @OutputTableName = 'AskBrentResults'
2620-
, @OutputTableNameFileStats = 'AskBrentResults_FileStats'
2621-
, @OutputTableNamePerfmonStats = 'AskBrentResults_PerfmonStats'
2622-
, @OutputTableNameWaitStats = 'AskBrentResults_WaitStats'
2620+
, @OutputTableName = 'BlitzFirstResults'
2621+
, @OutputTableNameFileStats = 'BlitzFirstResults_FileStats'
2622+
, @OutputTableNamePerfmonStats = 'BlitzFirstResults_PerfmonStats'
2623+
, @OutputTableNameWaitStats = 'BlitzFirstResults_WaitStats'
26232624
*/

sp_BlitzIndex.sql

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SET NOCOUNT ON;
3434
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3535
DECLARE @Version VARCHAR(30);
3636
SET @Version = '4.0';
37-
SET @VersionDate = '20160320';
37+
SET @VersionDate = '20160626';
3838
IF @Help = 1 PRINT '
3939
/*
4040
sp_BlitzIndex from http://FirstResponderKit.org
@@ -65,7 +65,7 @@ Known limitations of this version:
6565
Unknown limitations of this version:
6666
- We knew them once, but we forgot.
6767
68-
Changes in v4.0 - YYYY/MM/DD:
68+
Changes in v4.0 - 2016/06/26:
6969
- BREAKING CHANGE: Standardized input & output parameters to be
7070
consistent across the entire First Responder Kit. This also means the old
7171
old output parameter @Version is no more, because we are switching to
@@ -140,7 +140,7 @@ SELECT @SQLServerProductVersion = CAST(SERVERPROPERTY('ProductVersion') AS NVARC
140140
SELECT @SQLServerEdition =CAST(SERVERPROPERTY('EngineEdition') AS INT); /* We default to online index creates where EngineEdition=3*/
141141
SET @FilterMB=250;
142142

143-
RAISERROR(N'Starting run. sp_BlitzIndex(R) v3.0 - March 20, 2016', 0,1) WITH NOWAIT;
143+
RAISERROR(N'Starting run. sp_BlitzIndex(R) v4.0 - June 26, 2016', 0,1) WITH NOWAIT;
144144

145145
IF OBJECT_ID('tempdb..#IndexSanity') IS NOT NULL
146146
DROP TABLE #IndexSanity;
@@ -1427,10 +1427,10 @@ BEGIN
14271427
WHERE s.[object_id]=@ObjectID
14281428
UNION ALL
14291429
SELECT N'Database ' + QUOTENAME(@DatabaseName) + N' as of ' + convert(nvarchar(16),getdate(),121) +
1430-
N' (sp_BlitzIndex(R) v2.02 - Jan 30, 2014)' ,
1431-
N'From Brent Ozar Unlimited(R)' ,
1432-
N'http://www.BrentOzar.com/BlitzIndex' ,
1433-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.',
1430+
N' (sp_BlitzIndex(R) v4.0 - June 26, 2016)' ,
1431+
N'SQL Server First Responder Kit' ,
1432+
N'http://FirstResponderKit.org' ,
1433+
N'From Your Community Volunteers',
14341434
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
14351435
0 as display_order
14361436
)
@@ -2763,7 +2763,7 @@ BEGIN;
27632763
INSERT #BlitzIndexResults ( Priority, check_id, findings_group, finding, URL, details, index_definition,
27642764
index_usage_summary, index_size_summary )
27652765
VALUES ( -1, 0 ,
2766-
'Outdated sp_BlitzIndex', 'sp_BlitzIndex is Over 6 Months Old', 'http://www.BrentOzar.com/BlitzIndex/',
2766+
'Outdated sp_BlitzIndex', 'sp_BlitzIndex is Over 6 Months Old', 'http://FirstResponderKit.org/',
27672767
'Fine wine gets better with age, but this sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)) + ' is more like bad cheese. Time to get a new one.',
27682768
N'',N'',N''
27692769
);
@@ -2776,8 +2776,8 @@ BEGIN;
27762776
VALUES ( -1, 0 ,
27772777
'sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)),
27782778
CASE WHEN @GetAllDatabases = 1 THEN N'All Databases' ELSE N'Database ' + QUOTENAME(@DatabaseName) + N' as of ' + convert(nvarchar(16),getdate(),121) END,
2779-
N'From Brent Ozar Unlimited(R)' , N'http://www.BrentOzar.com/BlitzIndex' ,
2780-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.'
2779+
N'From Your Community Volunteers' , N'http://FirstResponderKit.org' ,
2780+
N''
27812781
, N'',N''
27822782
);
27832783
END
@@ -2788,16 +2788,16 @@ BEGIN;
27882788
VALUES ( -1, 0 ,
27892789
'sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)),
27902790
CASE WHEN @GetAllDatabases = 1 THEN N'All Databases' ELSE N'Database ' + QUOTENAME(@DatabaseName) + N' as of ' + convert(nvarchar(16),getdate(),121) END,
2791-
N'From Brent Ozar Unlimited(R)' , N'http://www.BrentOzar.com/BlitzIndex' ,
2792-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.'
2791+
N'From Your Community Volunteers' , N'http://FirstResponderKit.org' ,
2792+
N''
27932793
, N'',N''
27942794
);
27952795
INSERT #BlitzIndexResults ( Priority, check_id, findings_group, finding, URL, details, index_definition,
27962796
index_usage_summary, index_size_summary )
27972797
VALUES ( 1, 0 ,
27982798
'No Major Problems Found',
27992799
'Nice Work!',
2800-
'http://www.BrentOzar.com/BlitzIndex', 'Consider running with @Mode = 4 in individual databases (not all) for more detailed diagnostics.', 'The new default Mode 0 only looks for very serious index issues.', '', ''
2800+
'http://FirstResponderKit.org', 'Consider running with @Mode = 4 in individual databases (not all) for more detailed diagnostics.', 'The new default Mode 0 only looks for very serious index issues.', '', ''
28012801
);
28022802

28032803
END
@@ -2808,16 +2808,16 @@ BEGIN;
28082808
VALUES ( -1, 0 ,
28092809
'sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)),
28102810
CASE WHEN @GetAllDatabases = 1 THEN N'All Databases' ELSE N'Database ' + QUOTENAME(@DatabaseName) + N' as of ' + convert(nvarchar(16),getdate(),121) END,
2811-
N'From Brent Ozar Unlimited(R)' , N'http://www.BrentOzar.com/BlitzIndex' ,
2812-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.'
2811+
N'From Your Community Volunteers' , N'http://www.BrentOzar.com/BlitzIndex' ,
2812+
N''
28132813
, N'',N''
28142814
);
28152815
INSERT #BlitzIndexResults ( Priority, check_id, findings_group, finding, URL, details, index_definition,
28162816
index_usage_summary, index_size_summary )
28172817
VALUES ( 1, 0 ,
28182818
'No Problems Found',
28192819
'Nice job! Or more likely, you have a nearly empty database.',
2820-
'http://www.BrentOzar.com/BlitzIndex', 'Time to go read some blog posts.', '', '', ''
2820+
'http://FirstResponderKit.org', 'Time to go read some blog posts.', '', '', ''
28212821
);
28222822

28232823
END
@@ -2925,9 +2925,9 @@ BEGIN;
29252925
UNION ALL
29262926
SELECT N'Database ' + QUOTENAME(@DatabaseName) + N' as of ' + convert(nvarchar(16),getdate(),121) ,
29272927
N'sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)),
2928-
N'From Brent Ozar Unlimited(R)' ,
2929-
N'http://BrentOzar.com/BlitzIndex' ,
2930-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.',
2928+
N'From Your Community Volunteers' ,
2929+
N'http://FirstResponderKit.org' ,
2930+
N'',
29312931
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
29322932
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
29332933
NULL,0 as display_order
@@ -3034,10 +3034,10 @@ BEGIN;
30343034
UNION ALL
30353035
SELECT
30363036
N'sp_BlitzIndex (TM) v' + @Version + ' as of ' + CAST(CONVERT(DATETIME, @VersionDate, 102) AS VARCHAR(100)),
3037-
N'From Brent Ozar Unlimited(R)' ,
3038-
N'http://BrentOzar.com/BlitzIndex' ,
3037+
N'From Your Community Volunteers' ,
3038+
N'http://FirstResponderKit.org' ,
30393039
100000000000,
3040-
N'Thanks from the Brent Ozar Unlimited(R) team. We hope you found this tool useful, and if you need help relieving your SQL Server pains, email us at Help@BrentOzar.com.',
3040+
N'',
30413041
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
30423042
NULL, 0 as display_order
30433043
ORDER BY [Display Order] ASC, [Magic Benefit Number] DESC

sp_BlitzTrace.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Known limitations of this version:
5959
Unknown limitations of this version:
6060
- Probably a lot. This is one of our lesser-tested scripts.
6161
62-
Changes in v1.0 - YYYY/MM/DD
62+
Changes in v1.0 - 2016/06/26
6363
- Switched to MIT licensing.
6464
- Added @Help parameter.
6565

0 commit comments

Comments
 (0)