amachanic / sp_whoisactive

sp_whoisactive
GNU General Public License v3.0
1.13k stars 281 forks source link

Change the DMV we get the status from to sys.dm_exec_sessions instead of sys.sysprocesses #77

Open mfuller333 opened 2 years ago

mfuller333 commented 2 years ago

Change the DMV we get the status from to sys.dm_exec_sessions instead of sys.sysprocesses. This so we can see the sessions running state instead of only runnable.

Literally changing one line of code on line 3073 from LOWER(sp.status) AS status, to LOWER(ISNULL(r.status, sp.status)) AS status,

Not sure why it posted with 41 changes when I just refreshed from the base, and there is only the one line changed...weird

mfuller333 commented 2 years ago

@amachanic Do you see any issue with this?

mfuller333 commented 2 years ago

@amachanic Just touching base quick and seeing if we can get this in the next build? It appears accurate, and does not introduce any new issues. I have been running with this change for months across all environments.