You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sp_BlitzWho.sql
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ ALTER PROCEDURE dbo.sp_BlitzWho
20
20
@MinRequestedMemoryKB INT=0 ,
21
21
@MinBlockingSeconds INT=0 ,
22
22
@CheckDateOverride DATETIMEOFFSET=NULL,
23
+
@ShowActualParameters BIT=0,
23
24
@Version VARCHAR(30) =NULLOUTPUT,
24
25
@VersionDate DATETIME=NULLOUTPUT,
25
26
@VersionCheckMode BIT=0,
@@ -813,7 +814,13 @@ IF @ProductVersionMajor >= 11
813
814
FROM derp.query_plan.nodes(''/*:ShowPlanXML/*:BatchSequence/*:Batch/*:Statements/*:StmtSimple/*:QueryPlan/*:ParameterList/*:ColumnReference'') AS Node(Data)
814
815
FOR XML PATH('''')), 1,2,'''')
815
816
AS Cached_Parameter_Info,
816
-
qs_live.Live_Parameter_Info as Live_Parameter_Info,
817
+
'
818
+
IF @ShowActualParameters =1
819
+
BEGIN
820
+
SELECT @StringToExecute = @StringToExecute +N'qs_live.Live_Parameter_Info as Live_Parameter_Info,'
821
+
END
822
+
823
+
SELECT @StringToExecute = @StringToExecute + N'
817
824
qmg.query_cost ,
818
825
s.status ,
819
826
CASE
@@ -1135,7 +1142,7 @@ IF @OutputDatabaseName IS NOT NULL AND @OutputSchemaName IS NOT NULL AND @Output
1135
1142
,[query_plan]'
1136
1143
+CASEWHEN @ProductVersionMajor >=11THENN',[live_query_plan]'ELSEN''END+ N'
1137
1144
,[Cached_Parameter_Info]'
1138
-
+CASEWHEN @ProductVersionMajor >=11THENN',[live_parameter_info]'ELSEN''END+ N'
1145
+
+CASEWHEN @ProductVersionMajor >=11AND @ShowActualParameters =1THENN',[live_parameter_info]'ELSEN''END+ N'
0 commit comments