views:

363

answers:

2

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?

+1  A: 

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

gbn
works. thank you.
usr
+1  A: 

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.

Alex Peck
You can also click on the column title in the selection grid, will display the Filter dialog and let you set a filter condition.
Remus Rusanu