如何将 SQL Profiler 跟踪文件与死锁事件结合使用?
我对使用 sql profiler 还很陌生。我的应用程序中有一个在 sql 后端运行的场景,我不断在同一位置遇到死锁。我能够很容易地重现它。使用链接 SQL Profiler 步骤 我能够获得 sql profiler 死锁事件图。我还可以将其导出到单独的文件中。
但在这个探查器中,我看到诸如“服务器进程 ID”、“事件 ID”、“执行上下文 ID”、“页面锁定:”、“数据库 ID”、“文件 ID”、“页面 ID”、“关联对象 ID”之类的内容还有更多。但我不知道如何使用它并了解死锁的确切原因。我确信我的应用程序有一个需要清除的错误。但是我如何使用此跟踪来找到根本原因并了解背景。请帮我分析一下这个问题。请告诉我您认为对我有帮助的任何详细信息或链接。感谢您的建议和时间。
I am quite new to using sql profiler. I have a scenario in my application which runs on sql back end where i keep getting dead locks at the same place. I am able to reproduce it very easily. Using the link SQL Profiler Steps I was able to get a sql profiler deadlock event graph. I am also able to export it into a separate file.
But in this profiler I see things like "Server Process ID", "Event ID", "Execution Context ID", "PAGE LOCK:" "DB ID", "FILE ID", "PAGE ID", "associated object ID" and many more. But I am not sure how to use this and get to know the exact cause for the dead lock. I am sure that my application has a bug that I need to clear. But How can I use this trace to get to the root cause and understand the background. Please help me with this analysis. Please let me know any kind of details or links that you feel would be of help for me. Thank you for the advice and time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Bart Duncan 的死锁故障排除系列 - 他解释了如何解释死锁图中的数据。
http://blogs.msdn.com/b/bartd/archive/标签/sql+死锁/
Check out Bart Duncan's series on troubleshooting Deadlocks - he explains how to interpret the data in the deadlock graph there.
http://blogs.msdn.com/b/bartd/archive/tags/sql+deadlocks/