Saturday, May 31, 2014

How to get the Parameters of a Parameterized Query from dm_exec_sql_text

You would first need to set up a Trace or an Extended Events session to capture the actual query plan. Beware that this is extremely expensive, as it triggers all processes on the system to start generating this event, even if you filter for your own spid.


On my web site you find the tool sp_sqltrace, which you can use a starting point:

http://ift.tt/1oUcpRO





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

No comments:

Post a Comment