有没有工具可以查看针对数据库运行的查询? [英] Is there any tool to see the queries run against the database?

查看:154
本文介绍了有没有工具可以查看针对数据库运行的查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何工具可以检查asp.net或sql server并报告针对数据库运行的所有查询?我问的原因是我正在使用Linq进行项目,并想仔细检查其对每个页面的实际作用.

Is there any tool that will inspect either asp.net or sql server and report all the queries that are run against the database? The reason I ask is I am using Linq for a project and want to double check what its actually doing for each page.

理想情况下,我想在浏览器中查看页面,并提供创建该页面所运行的所有查询的报告.

Ideally I'd like to view a page in a browser and have a report of all the queries that were run to create that page.

我知道我可以使用调试/断点查看运行在单个查询中的SQL,并且我了解LinqPad,但是恐怕Linq会自己再进行几个查询以获取可能不是我直接的相关数据意识到.是否有我所描述的内容(工具/程序/报告/等)?谢谢!

I know I can view the SQL it runs for individual queries using debugging/breakpoints, and I know about LinqPad, but I'm afraid Linq is making several more queries on its own to get related data that I may not be directly aware of. Is there anything (tool/program/report/etc) like what I described? Thanks!

是否有任何 FREE 工具可以做到这一点?我正在使用Sql Server 2008 Express,但不幸的是没有SQL事件探查器.

Is there any FREE tool that can do this? I am using Sql Server 2008 Express and don't have SQL Profiler unfortunately.

推荐答案

绝对有一个名为

Absolutely, There is a SQL tool called SQL Profiler. It does require elevated database permissions in order to run profiler.

有一个不错的教程,介绍如何在

There is a decent tutorial on how to run Profiler on TechRepublic.

还有另一个选择是 NHibernate Profiler .我知道它不像SQL Profiler那样免费",从未使用过,但是它的屏幕截图看起来很酷.

Another option out there is the NHibernate Profiler. I know that it is not as "free" as SQL Profiler, have never used it, but the screen shots for it look pretty cool.

这篇关于有没有工具可以查看针对数据库运行的查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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