gpt4 book ai didi

SQL Server Profiler 弃用 - 替换?

转载 作者:行者123 更新时间:2023-12-02 02:13:54 25 4
gpt4 key购买 nike

我正在开发 ASP.NET 和 SQL Server 应用程序,有时我在 SQL 查询方面遇到问题,我希望看到 SQL Server 的“响应”而不仅仅是 ASP.NET 错误消息(这并不总是非常有帮助)

SQL Server 中的 Profiler.exe 工具能够执行此操作,但我在 MSDN 上看到 Microsoft 计划弃用该工具。

We are announcing the deprecation of SQL Server Profiler for Database Engine Trace Capture and Trace Replay. These features will be supported in the next version of SQL Server, but will be removed in a later version. The specific version of SQL Server has not been determined. The Microsoft.SqlServer.Management.Trace namespace that contains the Microsoft SQL Server Trace and Replay objects will also be deprecated. Note that SQL Server Profiler for the Analysis Services workloads is not being deprecated, and will continue to be supported.

http://msdn.microsoft.com/en-us/library/ms181091.aspx

他们没有提到什么工具将取代 profiler.exe

有人知道这件事吗?

如果我想查看(最近?)不成功的查询,是否有探查器的替代方案?

最佳答案

虽然在接下来的几个版本中继续使用跟踪是安全的,但 Profiler 永远不是答案( some evidence herealso here )。如果您要使用跟踪,请使用 a server-side trace 。只是不要编写将利用跟踪并期望超越几个版本的新代码。

长期的答案是使用 extended events 。您想要观看的博客是 SQL Server MVP Jonathan Kehayias of SQLskills.com 。他用外行人的术语很好地解释了扩展事件,并提供了很多很多现成的例子。他还提供有关 PluralSight 的精彩类(class)(您目前可以通过 Visual Studio Dev Essentials 免费获得这些类(class)):

另一个值得学习的人是 Erin Stellato。此后她转到了 Microsoft,但是 her blog posts at SQLskills留下来,并且他们拥有丰富的信息。

关于SQL Server Profiler 弃用 - 替换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16108586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com