I am battling with profiler trying to trace all select, insert, delete, and updates against a specific table. I have specified a Database ID in the filter as well as an object ID for the table in question. However the results are still displaying all actions for the Database and not filtering out the table I need. I haven't been able to find any good documentation on profiler. Any thoughts on a better way to trace these events for a specific table? Or any links to some in depth reading on SQL Profiler? Thanks for your help!
For some reason Object ID does not really work.
You can try the following: Select an Event SQLStmtCompleted. Filter by Database ID as you already do, TextData Like %FROM MyTableName%, Text Data Like %UPDATE MyTableName%, Text Data Like %DELETE MyTableName%', (and whatever you may think for Insert too), Application Name Not Like SQL Profiler, Not Like MS SQLEM
You still will have some extra entries, but much less then without filtering. I excluded MS SQLEM (Enterprise Manager) because for some reason it puts the entry without any EventID or TextData even if you open another table.
Do not forget that you may have performance issues running traces.
We walk in the dark places no others will enterWe stand on the bridge and no one may pass