I want to monitor all the DML commands that run on a particular table of my database in sql server profiler. Im using sql server 2008 R2
views:
63answers:
2Yes sure - you might want to check out this video series by Brad McGehee:
Mastering SQL Server Profiler - Video Training Course
It's very useful and teaches you the basics and some more advanced concepts of SQL Server Profiler. Highly recommended.
Or here's the 10-minute short version by Brent Ozar: SQL Server Profiler Tutorial Video
In SQL Server Profiler, when you create a new profile trace, you can define filters. You can limit the stats being collected by a ton of different criteria - one of them being the Object Name
, e.g. the table name you want to check for.
See Profiler Filters for more information on that particular topic.
Depending upon your exact needs you might also want to look into extended events. This has several advantages over using SQL Profiler/ SQL Trace in terms of performance, flexibility of filters, and the information available.
If you do decide to investigate this further you might find my answer to another question useful for getting up and running.