Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Amar P,
This stored procedure will consolidate useful information about an active SPID from sys.syspr
NOTE: Since sys.dm_exec_requests is very dynamic you may not always get results for a particular SPID but this SP will usually show results for a SPID that has been running for sometime and perhaps waiting on some resource to be allocated. You may find this SP quite handy when you are troubleshooting a "stuck" or long running query.
Usage: EXEC OPS_SP_DetailSPID @SPID = < INSERT SPID >