USE MasterGO declare @spid int; select @spid = 419--null:all ; ;WITH DATA(spid,blockRelationship,blocked,spidLevel,hostname,program_name,loginame,login_time,BlockDuration,Status,sqlText,Memo,stmt_start,stmt_end,db_Name)AS( SELECT spid ,CONVERT(VARCHA…