通过附加到 w3wp/WebDev.WebServer.exe (SQL Sever) 来监视应用程序端的 SQL 语句
我一定错过了一些东西...
Oracle 有简单、有用且免费的工具来附加到进程并监视其 SQL 语句,但我不能为 SQL Server 提供类似的工具。这在许多场景中都非常有用,特别是在处理第三方程序集时 (1)。 ANTS 6 似乎支持类似 (2) 的功能,但它不允许您像 dynaTrace 那样查看导致查询的堆栈跟踪。我也不认为 dotTrace 跟踪参数值。
肯定有一个广泛可用的选项来分析 SQL 应用程序端吗?
(1) - 链接
(2) - http://www.simple -talk.com/dotnet/performance/under-the-orm-hood-revealing-the-sql/
I must be missing something...
Oracle has simple, useful and free tools for attaching to a process and monitoring its SQL statements but I can't anything similar for SQL Server. This is incredibly useful across a number of scenarios, particularly when dealing with third-party assemblies (1). ANTS 6 seems to support something like this (2), though it doesn't allow you to view the stack-trace that lead to the query as dynaTrace does. I don't think dotTrace tracks parameter values, either.
Surely there's a widely available option for profiling SQL application-side?
(1) -
Link
(2) -
http://www.simple-talk.com/dotnet/performance/under-the-orm-hood-revealing-the-sql/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SQL Server 附带了一个名为 SQL Server Profiler 的工具。您可以使用它连接到 SQL Server 实例,并且您将能够查看该服务器上发出的所有 SQL 语句。
然后,您可以按应用程序名称、用户名等进行过滤,以仅查看您要监视的特定应用程序的语句。
这里也是免费的快速版本。
SQL Server comes with a tool called SQL Server Profiler. You can use it to connect to a SQL Server instance, and you'll be able to see all SQL statements issued on that server.
You can then filter by Application Name, Username, etc. to only see the statements of the particular application you want to monitor.
Here is also a free express version.