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;' )
3
3
GO
4
4
5
5
6
- ALTER PROCEDURE [dbo].[sp_AskBrent ]
6
+ ALTER PROCEDURE [dbo].[sp_BlitzFirst ]
7
7
@Question NVARCHAR (MAX ) = NULL ,
8
8
@Help TINYINT = 0 ,
9
9
@AsOf DATETIMEOFFSET = NULL ,
28
28
BEGIN
29
29
SET NOCOUNT ON ;
30
30
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
31
- SET @VersionDate = ' 20160615 '
31
+ SET @VersionDate = ' 20160626 '
32
32
33
33
IF @Help = 1 PRINT '
34
- sp_AskBrent from http://FirstResponderKit.org
34
+ sp_BlitzFirst from http://FirstResponderKit.org
35
35
36
36
This script gives you a prioritized list of why your SQL Server is slow right now.
37
37
@@ -53,7 +53,8 @@ Known limitations of this version:
53
53
Unknown limitations of this version:
54
54
- None. Like Zombo.com, the only limit is yourself.
55
55
56
- Changes in v24 - YYYY/MM/DD
56
+ Changes in v24 - 2016/06/26
57
+ - Renamed from sp_AskBrent.
57
58
- BREAKING CHANGE: Standardized input & output parameters to be
58
59
consistent across the entire First Responder Kit. This also means the old
59
60
old output parameter @Version is no more, because we are switching to
@@ -301,7 +302,7 @@ BEGIN
301
302
checks, we insert data into this table, and we manually put in the CheckID.
302
303
We (Brent Ozar Unlimited) maintain a list of the checks by ID#. You can
303
304
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 .
305
306
*/
306
307
307
308
IF OBJECT_ID (' tempdb..#AskBrentResults' ) IS NOT NULL
@@ -1021,7 +1022,7 @@ BEGIN
1021
1022
/* If we're waiting less than 30 seconds, run this check now rather than wait til the end.
1022
1023
We get this data from the ring buffers, and it's only updated once per minute, so might
1023
1024
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. */
1025
1026
INSERT INTO #AskBrentResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL )
1026
1027
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'
1027
1028
FROM (
@@ -1579,7 +1580,7 @@ BEGIN
1579
1580
/* If we're waiting 30+ seconds, run this check at the end.
1580
1581
We get this data from the ring buffers, and it's only updated once per minute, so might
1581
1582
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. */
1583
1584
INSERT INTO #AskBrentResults (CheckID, Priority, FindingsGroup, Finding, Details, DetailsInt, URL )
1584
1585
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'
1585
1586
FROM (
@@ -1662,13 +1663,13 @@ BEGIN
1662
1663
)
1663
1664
VALUES ( - 1 ,
1664
1665
0 ,
1665
- ' sp_AskBrent ' + CAST (CONVERT (DATETIMEOFFSET , @VersionDate, 102 ) AS VARCHAR (100 )),
1666
+ ' sp_BlitzFirst ' + CAST (CONVERT (DATETIMEOFFSET , @VersionDate, 102 ) AS VARCHAR (100 )),
1666
1667
' From Your Community Volunteers' ,
1667
1668
' http://FirstResponderKit.org/' ,
1668
1669
' We hope you found this tool useful.'
1669
1670
);
1670
1671
1671
- /* Outdated sp_AskBrent - sp_AskBrent is Over 6 Months Old */
1672
+ /* Outdated sp_BlitzFirst - sp_BlitzFirst is Over 6 Months Old */
1672
1673
IF DATEDIFF (MM, @VersionDate, SYSDATETIMEOFFSET ()) > 6
1673
1674
BEGIN
1674
1675
INSERT INTO #AskBrentResults
@@ -1681,10 +1682,10 @@ BEGIN
1681
1682
)
1682
1683
SELECT 27 AS CheckID ,
1683
1684
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 ,
1686
1687
' 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
1688
1689
END
1689
1690
1690
1691
@@ -2604,20 +2605,20 @@ GO
2604
2605
2605
2606
2606
2607
/* How to run it:
2607
- EXEC dbo.sp_AskBrent
2608
+ EXEC dbo.sp_BlitzFirst
2608
2609
2609
2610
With extra diagnostic info:
2610
- EXEC dbo.sp_AskBrent @ExpertMode = 1;
2611
+ EXEC dbo.sp_BlitzFirst @ExpertMode = 1;
2611
2612
2612
2613
In Ask a Question mode:
2613
- EXEC dbo.sp_AskBrent 'Is this cursor bad?';
2614
+ EXEC dbo.sp_BlitzFirst 'Is this cursor bad?';
2614
2615
2615
2616
Saving output to tables:
2616
- EXEC sp_AskBrent @Seconds = 60
2617
+ EXEC sp_BlitzFirst @Seconds = 60
2617
2618
, @OutputDatabaseName = 'DBAtools'
2618
2619
, @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 '
2623
2624
*/
0 commit comments