We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eee3e23 commit 24ebe9fCopy full SHA for 24ebe9f
6 files changed
SQLChecks/Auto Create Statistics is Off.sql
@@ -1,7 +1,3 @@
1
-
2
- DECLARE
3
- @AdditionalInfo AS XML
4
5
SET @AdditionalInfo =
6
(
7
SELECT
@@ -29,7 +25,7 @@
29
25
AdditionalInfo
30
26
)
31
27
32
- CheckId = '{CheckId}' ,
28
+ CheckId = {CheckId} ,
33
Title = N'{CheckTitle}' ,
34
RequiresAttention =
35
CASE
@@ -41,4 +37,4 @@
41
37
CurrentStateImpact = 3 , -- High
42
38
RecommendationEffort = 1 , -- Low
43
39
RecommendationRisk = 1 , -- Low
44
- AdditionalInfo = @AdditionalInfo;
40
+ AdditionalInfo = @AdditionalInfo;
SQLChecks/Optimize for Ad-Hoc Workloads should be Enabled.sql
@@ -1,5 +1,4 @@
DECLARE
- @AdditionalInfo AS XML ,
@AdhocRatio AS DECIMAL(3,2) ,
@OptimizeForAdhocWorkloads AS BIT;
Template/Check_Footer.sql
@@ -1,4 +1,5 @@
+
BREAK;
END TRY
@@ -15,7 +16,7 @@
15
16
IsDeadlockRetry
17
18
19
20
ErrorNumber = ERROR_NUMBER () ,
21
ErrorMessage = ERROR_MESSAGE () ,
22
ErrorSeverity = ERROR_SEVERITY () ,
Template/Check_Header.sql
@@ -1,10 +1,12 @@
-DECLARE
- @CheckId AS INT = {CheckId}
- , @DeadlockRetry AS BIT = 0
-- Check #{CheckId} : {CheckTitle}
+DECLARE
+ @CheckId AS INT = {CheckId} ,
+ @DeadlockRetry AS BIT = 0 ,
8
+ @AdditionalInfo AS XML;
9
10
WHILE
11
1 = 1
12
BEGIN
Template/Template_Footer.sql
@@ -1,6 +1,7 @@
GO
SET NOEXEC OFF;
-- View the results
Template/Template_Header.sql
@@ -2,11 +2,15 @@ USE
[master];
-GO
:setvar ThresholdParam 10
:on error exit
13
14
/*
Detect SQLCMD mode and disable script execution if SQLCMD mode is not supported.
To re-enable the script after enabling SQLCMD mode, execute the following:
@@ -21,17 +25,16 @@ BEGIN
END
23
24
--- Local variables and temporary tables
- @CheckId AS INT ,
- @DeadlockRetry AS BIT ,
+ --@CheckId AS INT ,
+ --@AdditionalInfo AS XML ,
+ --@DeadlockRetry AS BIT ,
@DatabaseName AS SYSNAME ,
@Command AS NVARCHAR(MAX) ,
@InstanceCompatibilityLevel AS TINYINT ,
- @AdhocRatio AS DECIMAL(3,2) ,
- @OptimizeForAdhocWorkloads AS BIT ,
36
+ --@AdhocRatio AS DECIMAL(3,2) ,
+ --@OptimizeForAdhocWorkloads AS BIT ,
@OperatingSystemArchitecture AS NVARCHAR(4) ,
@SQLServerArchitecture AS NVARCHAR(4) ,
@CurrentMaxMemorySetting_MB AS INT ,
0 commit comments