Skip to content

Commit 2e42c89

Browse files
committed
Merge branch 'dev'
2 parents aace452 + df3782e commit 2e42c89

16 files changed

+1223
-192
lines changed

Documentation/sp_Blitz Checks by Priority.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
66

77
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.
88

9-
CURRENT HIGH CHECKID: 211
10-
If you want to add a new one, start at 212
9+
CURRENT HIGH CHECKID: 212
10+
If you want to add a new one, start at 213
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
@@ -283,5 +283,6 @@ If you want to add a new one, start at 212
283283
| 250 | Server Info | Virtual Server | https://www.BrentOzar.com/go/virtual | 103 |
284284
| 250 | Server Info | Windows Version | | 172 |
285285
| 250 | Server Info | Power Plan | | 211 |
286+
| 250 | Server Info | Stacked Instances | https://www.brentozar.com/go/babygotstacked/ | 212 |
286287
| 254 | Rundate | (Current Date) | | 156 |
287288
| 255 | Thanks! | From Your Community Volunteers | | -1 |

Install-All-Scripts.sql

Lines changed: 323 additions & 54 deletions
Large diffs are not rendered by default.

Install-Core-Blitz-No-Query-Store.sql

Lines changed: 259 additions & 36 deletions
Large diffs are not rendered by default.

Install-Core-Blitz-With-Query-Store.sql

Lines changed: 315 additions & 46 deletions
Large diffs are not rendered by default.

sp_AllNightLog.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ SET NOCOUNT ON;
2828
BEGIN;
2929

3030
DECLARE @Version VARCHAR(30);
31-
SET @Version = '2.1';
32-
SET @VersionDate = '20180101';
31+
SET @Version = '2.2';
32+
SET @VersionDate = '20180201';
3333

3434
IF @Help = 1
3535

sp_AllNightLog_Setup.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ SET NOCOUNT ON;
3535
BEGIN;
3636

3737
DECLARE @Version VARCHAR(30);
38-
SET @Version = '2.1';
39-
SET @VersionDate = '20180101';
38+
SET @Version = '2.2';
39+
SET @VersionDate = '20180201';
4040

4141

4242
IF @Help = 1

sp_Blitz.sql

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ AS
3232
SET NOCOUNT ON;
3333
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
3434
DECLARE @Version VARCHAR(30);
35-
SET @Version = '6.1';
36-
SET @VersionDate = '20180101';
35+
SET @Version = '6.2';
36+
SET @VersionDate = '20180201';
3737
SET @OutputType = UPPER(@OutputType);
3838

3939
IF @Help = 1 PRINT '
@@ -520,6 +520,16 @@ AS
520520
LoginName NVARCHAR(256) ,
521521
DBUserName NVARCHAR(256)
522522
);
523+
524+
525+
IF OBJECT_ID('tempdb..#Instances') IS NOT NULL
526+
DROP TABLE #Instances;
527+
CREATE TABLE #Instances
528+
(
529+
Instance_Number NVARCHAR(MAX) ,
530+
Instance_Name NVARCHAR(MAX) ,
531+
Data_Field NVARCHAR(MAX)
532+
);
523533

524534
IF OBJECT_ID('tempdb..#IgnorableWaits') IS NOT NULL
525535
DROP TABLE #IgnorableWaits;
@@ -7186,7 +7196,42 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
71867196

71877197
END;
71887198

7189-
7199+
IF NOT EXISTS ( SELECT 1
7200+
FROM #SkipChecks
7201+
WHERE DatabaseName IS NULL AND CheckID = 212 )
7202+
BEGIN
7203+
7204+
IF @Debug IN (1, 2) RAISERROR('Running CheckId [%d].', 0, 1, 212) WITH NOWAIT;
7205+
7206+
INSERT INTO #Instances (Instance_Number, Instance_Name, Data_Field)
7207+
EXEC master.sys.xp_regread @rootkey = 'HKEY_LOCAL_MACHINE',
7208+
@key = 'SOFTWARE\Microsoft\Microsoft SQL Server',
7209+
@value_name = 'InstalledInstances'
7210+
7211+
IF (SELECT COUNT(*) FROM #Instances) > 1
7212+
BEGIN
7213+
7214+
DECLARE @InstanceCount NVARCHAR(MAX)
7215+
SELECT @InstanceCount = COUNT(*) FROM #Instances
7216+
7217+
INSERT INTO #BlitzResults
7218+
(
7219+
CheckID ,
7220+
Priority ,
7221+
FindingsGroup ,
7222+
Finding ,
7223+
URL ,
7224+
Details
7225+
)
7226+
SELECT
7227+
212 AS CheckId ,
7228+
250 AS Priority ,
7229+
'Server Info' AS FindingsGroup ,
7230+
'Instance Stacking' AS Finding ,
7231+
'https://www.brentozar.com/go/babygotstacked/' AS URL ,
7232+
'Your Server has ' + @InstanceCount + ' Instances of SQL Server running. More than one is usually a bad idea. Read the URL for more info'
7233+
END;
7234+
END;
71907235

71917236
IF NOT EXISTS ( SELECT 1
71927237
FROM #SkipChecks

sp_BlitzBackups.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ AS
2121
SET NOCOUNT ON;
2222
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
2323
DECLARE @Version VARCHAR(30);
24-
SET @Version = '2.1';
25-
SET @VersionDate = '20180101';
24+
SET @Version = '2.2';
25+
SET @VersionDate = '20180201';
2626

2727
IF @Help = 1 PRINT '
2828
/*

0 commit comments

Comments
 (0)