23

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?

usr
  • 168,620
  • 35
  • 240
  • 369

2 Answers2

32

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

gbn
  • 422,506
  • 82
  • 585
  • 676
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.

Alex Peck
  • 4,603
  • 1
  • 33
  • 37
  • 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 Jul 03 '09 at 14:57