How can I add a filter which can trace sql statements for a particular table name?
Asked
Active
Viewed 4.6k times
32
-
http://stackoverflow.com/questions/296906/log-table-access-using-sql-server-profiler – Mitch Wheat Nov 02 '10 at 09:59
2 Answers
44
You can't set filter to trace specific table directly.
What you can do is specify a filter for Text Data
:
File -> Properties -> Event Selection -> Column Filters -> TextData -> Like -> [Table Name]
You may find it important to wrap your table's name with wildcard characters: "%table name%".

Ankush Madankar
- 3,689
- 4
- 40
- 74

Damian Leszczyński - Vash
- 30,365
- 9
- 60
- 95
-
As a complement to the answer, here's how to use multiple filters: http://stackoverflow.com/a/6366780/890890 – fabriciorissetto Jun 06 '16 at 21:49
-
16You may find it important to wrap your table's name with wildcard characters: "%table name%". – MalcLear Jun 15 '17 at 20:04
7
This is how I could do it....
Choose below events in the profiler:
Audit Database Object Access Event
Audit Fulltext
Audit Schema Object Access Event
Make sure to choose Text Data
, under columns.
Then under column filters choose:
DatabaseID
---> enter specific databaseIDObjectId
---> enter specific objectID (select fromsysobjects
for that specific table)ObjectName
---> enter required tablename

Geoff
- 8,551
- 1
- 43
- 50

Pradeep Kumar
- 71
- 1
- 1