如何筛选单个数据库的SQL Server 2008 Profiler输出? [重复]

时间:2023-01-14 14:56:12

This question already has an answer here:

这个问题在这里已有答案:

SQL Server 2008 Profiler always profiles all databases. I want to restrict profiling or output to a single database. How can that be done most easily?

SQL Server 2008 Profiler始终配置所有数据库。我想限制分析或输出到单个数据库。怎么能最容易地完成?

2 个解决方案

#1


32  

There is a column output/filter by database name or Id. You have to choose "Show all columns" when setting the trace up.

按数据库名称或Id存在列输出/过滤器。设置跟踪时,您必须选择“显示所有列”。

#2


9  

Go to trace properties, then show all columns. Once you have selected DatabaseName you can go into ColumnFilters... and set Like to equal the name of the database you want to filter on.

转到跟踪属性,然后显示所有列。选择DatabaseName后,您可以进入ColumnFilters ...并将Like设置为等于要筛选的数据库的名称。

#1


32  

There is a column output/filter by database name or Id. You have to choose "Show all columns" when setting the trace up.

按数据库名称或Id存在列输出/过滤器。设置跟踪时,您必须选择“显示所有列”。

#2


9  

Go to trace properties, then show all columns. Once you have selected DatabaseName you can go into ColumnFilters... and set Like to equal the name of the database you want to filter on.

转到跟踪属性,然后显示所有列。选择DatabaseName后,您可以进入ColumnFilters ...并将Like设置为等于要筛选的数据库的名称。