How to Check or Trace Stored Procedures SP’s fired or executed on Microsoft SQL Server database using SQL profiler tool

Hi Everyone, In this post I will explore on how to use SQL Profiler Trace tool to check the SP’s executed on SQL Server Database.

Step 1) Open SQL Profiler - In SQL Server Management Studio -> Click on Tools Menu and Select -> SQL Server Profiler



Step 2) Under General Tab -> Select "TSQL_SPs”  in “Use the template” drop down.


Step 3) Under Event Selection Tab -> Check the check boxes for “SQL:BatchCompleted” and “SQL:BatchStarting” and Uncheck all other check boxes.
(Unchecking others is optional this is done to limit the information being display for other types of Events)


Note – If SQL-BatchCompleted and SQL-BatchStarting is not visible in the Event Selection, then check the check box - "Show all events" in the Left had corner, this will display all the Events and select the above specified Event.


Step 4) Click on Column Filters button -> Under DatabaseName -> Like -> Enter the Database Name and click OK and RUN button –
This will start the profiler window where we can the Stored Procedures fired on the selected database.

No comments: