Capturing the context_info column from sys.dm_exec_sessions #723
Replies: 2 comments
-
Thanks for the suggestion. I'm not sure how common this is. Potentially it could be added to the slow query capture and the running query capture. This wouldn't give you a complete picture of utilization though as slow query capture is just queries that take longer than 1 second to run (by default). The running query capture is just a snapshot of what happens to be running at the time. You can't get an accurate picture unless you capture all rpc/batch completed events - it would probably be better to create a one-off extended event for this purpose and run it for a short period of time. I can see how it would be useful to have the context info in the slow query capture and running query snapshots though. If a client had performance issues you could see what queries are captured for them by filtering on the context info. This isn't something I need myself but I'll consider it for future development. |
Beta Was this translation helpful? Give feedback.
-
Context info is now captured in 3.1 |
Beta Was this translation helpful? Give feedback.
-
Hi David
I am not sure if this is an edge use-case or not, but here it goes. We have some session-level runtime context details available in the CONTEXT_INFO column of the said DMV. For example, a customer id, database name, etc. These would be useful for us to develop some analytics on our workload. One example of this is to IO, memory and CPU consumption inside each database for any given customer id (databases being multi-tenant and all tenants are using the same SQL login to connect to that db). Is that info collected now and if not, can it be included in a future release?
And as I said, not sure if this is an edge use-case, but if not, I kindly invite others to +1 to this idea.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions