sp_whoisactive
sp_whoisactive copied to clipboard
Query plans getting dropped, potentially due to OPENQUERY
Observed on SQL Server 2017:
- Query coming in from remote server via OPENQUERY
- Query plan not showing in sp_whoisactive output, even though it was attainable directly via requests DMV and query_plan function
- Commenting out join predicates around line 2898 fixed the issue (user_process and start_time logic)
- Further exploration revealed the root cause: sysprocesses "login time" had a timestamp of over 30m after that reported in the sys.dm_exec_sessions "login time" column!
Seems to be a DMV bug, but is there some workaround?