且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在SQL事件探查器中仅监视t-sql命令?

更新时间:2023-02-05 23:28:53

选择跟踪模板(例如Tuning)并使用过滤器.

Pick a trace template (such as Tuning) and use a filter.

通过特定的登录名(例如您自己的登录名或服务的登录名),特定的数据库进行过滤.

Either filter by a particular login (such as your own login or a service's login), a particular database.

例如,按数据库过滤:在跟踪属性"->事件"选项卡->选择显示所有列"下.在数据库名称上设置Like过滤器.

For instance, to filter by database: Under Trace properties -> Events tab -> Select show all columns. Set a Like filter on database name.

我发现在说> 10的逻辑Reads的数量上设置一个过滤器,可以过滤掉大部分噪声.

I find setting a filter on the number of Logical Reads of say > 10 reads, filters out most of the noise.

  • How to: Filter Events in a Trace
  • Using SQL Server Profiler