4

I'm currently experiencing some problems on my DotNetNuke SQL Server 2005 Express site on Win2k8 Server. It runs smoothly for most of the time. However, occasionally (order once or twice an hour) it runs very slowly indeed - from a user perspective it's almost like there's a deadlock of some description when this occurs.

To try to work out what the problem is I've run SQL Profiler against the SQL Express database.

Looking at the results, some specific questions I have are:

  1. The SQL trace shows an Audit Logon and Audit Logoff for every RPC:Completed - does this mean Connection Pooling isn't working?

  2. When I look in Performance Monitor at ".NET CLR Data", then none of the "SQL client" counters have any instances - is this just a SQL Express lack-of-functionality problem or does it suggest I have something misconfigured?

  3. The queries running when the slowness occur don't yet seem unusual - they run fast at other times. What other perfmon counters or other trace/log files can you suggest as useful tools for my further investigation.

4

4 回答 4

3

直接跳到 Profiler 可能是错误的第一步。首先,尝试检查服务器上的 Perfmon 统计信息。我这里有一个在线教程:

http://www.brentozar.com/perfmon

开始捕获这些指标,然后在经历了其中一种减速之后,停止收集。查看当时的性能指标,瓶颈就会出现。如果您想通过 brento@brentozar.com 将 Perfmon 的 csv 输出发送给我,我可以让您了解正在发生的事情。

之后您可能仍需要运行 Profiler,但我会先排除操作系统和硬件。另外,只是想一想-您是否检查了服务器的系统和应用程序事件日志以确保在这些时间没有发生任何事情?我见过这样的情况,例如,防病毒客户端过于频繁地下载新补丁,并在每次更新后进行轻度扫描。

于 2009-03-22T13:10:51.153 回答
1

我的蜘蛛侠感觉告诉我,您可能遇到了 SQL Server 阻塞问题。阅读本文以帮助您监控服务器上的阻塞以检查其原因。

如果您认为问题可能与性能有关并且想查看您的硬件瓶颈是什么,那么您应该使用 perfmon 收集一些 cpu、磁盘和内存统计信息,然后将它们与您的分析器跟踪相关联,以查看慢响应是否相关.

于 2009-03-20T13:16:26.273 回答
0
  1. no
  2. nothing wrong with that...it shows that you're not using the .NET functionality embed in SQL Server.
  3. You can check http://www.xsqlsoftware.com/Product/xSQL_Profiler.aspx for more detailed analysis of profiler trace. It has reports that show top queries by time or CPU (Not one single query, but sum of all execution of a single query).
于 2009-03-20T12:33:28.497 回答
0

其他一些需要检查的事情:

  • 确保您的数据文件或日志文件没有自动扩展。

  • 确保您的防病毒软件设置为忽略您的 sql 数据和日志文件。

  • 查看分析器输出时,请确保检查在您的目标之前完成的查询,它们可能已被阻塞。

  • 确保您已关闭数据库上的自动关闭;关闭后重新打开需要一些
    时间。

于 2009-03-24T23:27:27.237 回答