Closed kottivakkam closed 2 years ago
I'll accept a PR of adding it to the [additional_info] collection. (But maybe don't include it if it's equal to 0x.)
Just curious, though, what are you doing where you need this? Probably a good idea to discontinue using context_info on the app side now that session_context exists.
We have a DW processing data using SPs. There is a central SP responsible for running custom-made SPs for each fact. The central SP takes care of logging, scheduling etc. And when it starts a new fact-SP, it stamps the SP name into context_info. Having the SP name directly accessible in sp_whoisactive makes it faster for the support to track down poor performing or blocking fact-SPs.
We have experimented with @get_full_inner_text, but as the custom-made SPs in some cases calls other generic SPs, it does not always give us what we are looking for.
This would be easy to add to the y
derived table, with something like NULLIF(COALESCE(r.context_info, s.context_info), 0x)
All set.
Please add context_info from sys.dm_exec_requests to the output.