sp_whoisactive icon indicating copy to clipboard operation
sp_whoisactive copied to clipboard

Query plans getting dropped, potentially due to OPENQUERY

Open amachanic opened this issue 5 years ago • 0 comments

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?

amachanic avatar Nov 13 '20 19:11 amachanic