是否记录 SQL Server 超时? [英] Are SQL Server timeouts logged?

查看:42
本文介绍了是否记录 SQL Server 超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server 超时(特别是 SELECT 查询)是否记录在 ERRORLOG 文件中?

Are SQL Server timeouts (SELECT queries, in particular) logged in the ERRORLOG file?

背景是一位客户,其网站偶尔会出现请求超时"消息,在我看来,超时是由数据库超时引起的.有问题的 ERRORLOG 中没有超时错误.

Background is a customer with a web site having occasional "Request timeout" messages, looking to me assuming that the timeout is caused by a database timeout. There are no timeout errors in the ERRORLOG in question.

推荐答案

没有.您将需要使用 SQL Profiler.具有锁定超时事件和死锁图事件的标准跟踪应该可以做到这一点.

No. You will need to use SQL Profiler. A standard trace with the Lock Timeout event and Deadlock Graph events should do it.

死锁图事件类

除了硬件(例如足够的 RAM 和快速驱动器,以及在适当的 RAID 配置上适当放置数据和日志文件),大多数超时是由于没有足够良好"的索引集来满足您的工作负载.

Hardware aside (such as enough RAM and fast drives, and appropriate placement of Data and Log files on the appropriate RAID configurations) most timeouts are caused by not having a sufficently 'good' set of indexes for your workload.

您是否有定期安排索引维护计划?

Do you have index maintenance plans scheduled regularly?

这篇关于是否记录 SQL Server 超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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