怎么看SQL 2008的锁和阻止表 [英] How to see SQL 2008 Locks and Blocked Tables

查看:89
本文介绍了怎么看SQL 2008的锁和阻止表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序的ASP.NET执行,似乎SQL 2008前preSS持有一些锁,我也得到


 超时过期。之前结束的超时时间已过


  
  的操作或服务器不是
  响应


也许我的一些查询未优化。 Visual Studio中崩溃了:


 微软的Visual Studio现在可能不稳定。则建议

您保存所有文件并退出。


我要看看查询挡住了我的表,但我有防爆preSS版本。我该怎么办?

感谢


解决方案

您可以查询对 sys.dm_tran_locks 动态视图来获取此信息。去这里在MSDN上瘦了。

During the ASP.NET execution of my app, it seems SQL 2008 Express holds some lock, and I get

Timeout expired.  The timeout period elapsed prior to completion of

the operation or the server is not responding

Maybe some of my query is not optimized. Visual Studio crashes with:

Microsoft Visual Studio may be unstable now. It is recommended that

you save all files and exit.

I need to see what query is blocking my tables, but I have the Express version. How can I do?

Thanks

解决方案

You can query against the sys.dm_tran_locks dynamic view to obtain this information. Go here on MSDN to lean more.

这篇关于怎么看SQL 2008的锁和阻止表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆