浏览代码

v2.4.1.5

Fixed table error with Query Store and Auto Tuning sections when features are not enabled (Thanks Luis Canastreiro);
Fixed Disk space subsection not working with SQL 2008;
Fixed case sensitivity issues (Thanks sm8680).
pmasl 6 年之前
父节点
当前提交
c76f79db69
共有 2 个文件被更改,包括 8 次插入6 次删除
  1. 3 1
      BPCheck/Changelog.txt
  2. 5 5
      BPCheck/Check_BP_Servers.sql

+ 3 - 1
BPCheck/Changelog.txt

@@ -374,4 +374,6 @@ v2.4.1.2 - 04/17/2019 - Improved Max Server Memory section to account for new, s
 v2.4.1.4 - 06/05/2019 - Fixed Automatic Tuning recommendations section;
 						Fixed MaxDOP check as per new documented recommendation;
 						Fixed issue with MS-shipped DBs exclusion with SQL 2019.
-v2.4.1.5 - 06/06/2019 - Fixed table error with Query Store and Auto Tuning sections when features are not enabled.
+v2.4.1.5 - 06/06/2019 - Fixed table error with Query Store and Auto Tuning sections when features are not enabled (Thanks Luis Canastreiro);
+						Fixed Disk space subsection not working with SQL 2008;
+						Fixed case sensitivity issues (Thanks sm8680).

+ 5 - 5
BPCheck/Check_BP_Servers.sql

@@ -145,7 +145,7 @@ BEGIN
 	-- Perms 2
 	INSERT INTO @permstbl
 	SELECT a.name
-	FROM master.sys.all_objects a (NOLOCK) INNER JOIN master.sys.database_permissions b (NOLOCK) ON a.[OBJECT_ID] = b.major_id
+	FROM master.sys.all_objects a (NOLOCK) INNER JOIN master.sys.database_permissions b (NOLOCK) ON a.[object_id] = b.major_id
 	WHERE a.type IN ('P', 'X') AND b.grantee_principal_id <>0 
 	AND b.grantee_principal_id <>2
 	AND b.grantee_principal_id = @masterpid;
@@ -449,7 +449,7 @@ SELECT 'Information' AS [Category], 'Machine' AS [Information],
 --------------------------------------------------------------------------------------------------------------------------------
 -- Disk space subsection
 --------------------------------------------------------------------------------------------------------------------------------
-IF @sqlmajorver > 9
+IF @sqlmajorver > 10 OR (@sqlmajorver = 10 AND @sqlminorver = 50 AND @sqlbuild >= 2500)
 BEGIN
 	RAISERROR (N'|-Starting Disk space', 10, 1) WITH NOWAIT
 	SELECT DISTINCT 'Information' AS [Category], 'Disk_Space' AS [Information], vs.logical_volume_name,
@@ -5583,10 +5583,10 @@ SELECT 'Instance_checks' AS [Category], 'System_Configurations' AS [Check], 'Sta
 UNION ALL
 SELECT 'Instance_checks' AS [Category], 'System_Configurations' AS [Check], 'xp_cmdshell' AS [Setting], @cmdshell AS [Current Value], CASE WHEN @cmdshell = 1 THEN '[WARNING: xp_cmdshell setting is enabled]' ELSE '[OK]' END AS [Deviation], '' AS [Comment];
 
-IF (SELECT COUNT([Name]) FROM master.sys.configurations WHERE [value] <> [value_in_use] AND [is_dynamic] = 0) > 0
+IF (SELECT COUNT([name]) FROM master.sys.configurations WHERE [value] <> [value_in_use] AND [is_dynamic] = 0) > 0
 BEGIN
-	SELECT 'Instance_checks' AS [Category], 'System_Configurations_Pending'AS [Check], '[WARNING: There are system configurations with differences between running and configured values]' AS [Deviation]
-	SELECT 'Instance_checks' AS [Category], 'System_Configurations_Pending'AS [Information], [Name] AS [Setting],
+	SELECT 'Instance_checks' AS [Category], 'System_Configurations_Pending' AS [Check], '[WARNING: There are system configurations with differences between running and configured values]' AS [Deviation]
+	SELECT 'Instance_checks' AS [Category], 'System_Configurations_Pending' AS [Information], [name] AS [Setting],
 		[value] AS 'Config_Value',
 		[value_in_use] AS 'Run_Value'
 	FROM master.sys.configurations (NOLOCK)