Blocked Process Report
Profiler提供一个被阻塞进程报告的事件Errors and Warnings->Blocked Process Report

指示某个任务已被阻塞,导致超过指定的时间。此事件类不包括系统任务和正在等待未发现死锁的资源的任务。若要配置报告的频率,请使用 sp_configure 命令配置阻塞的进程阈值选项。

默认阈值为0,此时出现阻塞不会触发此事件,可以使用下面脚本设置该阈值为5秒

exec sp_configure 'blocked process threshold',5;
reconfigure;
select * from sys.configurations 
--where name='blocked process threshold (s)'
order by name
View Code

相关文章: