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
Yes, SQL Server Profiler does affect performance. When you trace using the GUI, all events are synchronously processed and filtered, so factors such as server load, network latency, which events you collect, and even where the collected events are stored, all contribute to overhead.
Besides the suggested solutions, you can use a third party tool that reads SQL Server traces.
ApexSQL Comply is a SQL Server auditing tool that used SQL traces, reads relevant information from them, and stores it into its central repository database. It allows you to select the tables and event types you want to monitor. You can specify to monitor different set of events for every database.
It provides various built-in reports, where you can filter by a specific DML operation. It also has custom reports, so you can create your own reports.
You can set the tool to monitor just specific events on the table, or if you monitor all events, you can use the filters on the reports to show just the DML commands.
Disclaimer: I work for ApexSQL as a Support engineer
Yes 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With