We help IT Professionals succeed at work.

Running SQL Profiler jobs

VBBRett asked
I want to run a SQL profiler job where I query how many transactions hit a particular table.  I also want to know what user that is logged in hits the table, what queries and stored procedures hit the table and what time the table gets hit.  Ultimately, I would be able to see how many transactions are running at any given time.  How do I do this step by step?
Watch Question

Database Analyst
You should start SQL SSMS, start SQL Profiler from Tools menu, select columns listed below, check boxes ExistingConnection under Sessions, RPC:Completed under StoredProcedures and SQL:BatchCompleted under TSQL. Then set filter to capture all events for your table_name only - like ‘%table_name%’.

TextData, ApplicationName, LoginName,CPU,Reads,Writes,StartTime,EndTime,Duration,ClientProcessId,SPID,Error,HostName

Caution that you don’t want to run it on the SQL server itself but from a client, then by running it for a long period of time it may accumulate lots of data, and last but not least it could impact your SQL performance.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.