首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

运用Profiler Blocked Process Report & Alert 监控数据库Blocking

2012-09-02 
使用Profiler Blocked Process Report & Alert 监控数据库Blocking3.模拟阻塞,打开两个查询界面同时运行:

使用Profiler Blocked Process Report & Alert 监控数据库Blocking

3.   模拟阻塞,打开两个查询界面同时运行:

 

BEGIN TRAN

UPDATE TEST SET NAME='TEST1'

 

4.十秒钟后我们会看到阻塞的信息已经记录到Profiler中了:

运用Profiler Blocked Process Report & Alert 监控数据库Blocking

 

5.   我们可以将Trace模板保存成脚本然后在数据库上定期运行,这样我们就可以了解数据库的阻塞状态。由于后台检测机制与死锁相同,所以对数据库的影响是非常小的。

 

更多信息参考:Blocked Process Report 事件类:http://msdn.microsoft.com/zh-cn/library/ms191168.aspx

 

另外我们设置Alert,如果Blocking超过一定时间可以发送给DBA。

 

1.   创建Alert:

 运用Profiler Blocked Process Report & Alert 监控数据库Blocking

 

2.   设置Response(可以发送给DBA,也可以执行上面产生的脚本,可以及时的帮你捕获Blocking信息)

 

运用Profiler Blocked Process Report & Alert 监控数据库Blocking

 

热点排行