In 8 Ways To Hunt T-SQL Query Plans, we looked at some simple ways to get our hands on those valuable query plans. However, sometimes we might want to record query plans as part of a bigger effort to profile and troubleshoot a server, or perhaps optimize it for a given workload.
When this need arises, there are two additional tools we can make use of:
- SQL Trace
- Extended Events
In this pumpkin we’ll take a look at how we can use SQL Trace to accomplish this goal.