–查看阻塞
select *from sys.sysprocesses where blocked<>0
—根据SPID查看sql
select er.session_id,CAST(csql.text AS varchar(255)) AS CallingSQL
from master.sys.dm_exec_requests er
WITH (NOLOCK)
CROSS APPLY MASTER.sys.fn_get_sql (er.sql_handle) csql
where er.session_id =674