如何在 SQL Server Management Studio 中查看已执行的查询? [英] How do I view executed queries within SQL Server Management Studio?

查看:54
本文介绍了如何在 SQL Server Management Studio 中查看已执行的查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 SQL Server Management Studio 的新手,想知道:有没有办法查看对数据库运行了哪些查询?

I am new to SQL Server Management Studio and am wondering: is there is a way to see which queries have been run against a database?

在活动监视器中,有一个最近昂贵的查询"报告,但我猜这不是所有查询,因为我没有看到我运行的查询.

In the Activity monitor, there is a "Recent Expensive Queries" report but I'm guessing that isn't all of the queries since I'm not seeing the ones I have run.

我正在运行 SQL Server Express 2008 v 10.0.1600.22.

I am running SQL Server Express 2008 v 10.0.1600.22.

推荐答案

使用 SQLProfiler 并对其使用过滤器来获取最昂贵的查询.

Use SQL Profiler and use a filter on it to get the most expensive queries.

这篇关于如何在 SQL Server Management Studio 中查看已执行的查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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