Skip to content


Developers, use Profiler to profile yourself

Problem

You’re starting to work on an existing application that doesn’t have sufficient documentation.  You need to trace the current flow to understand and review all SQL calls during the lifecycle of the application (RPC:Complete and SQL:BatchCompleted).  You know that SQL Profiler can do this but you’re unsure how to make use of the filter options.

Solution

In order to solve the following problem you would want to use SQL Profiler.  Start a new trace and in the event selection deselect all events other than RPC:Completed and SQL:BatchCompleted.

Profile1

Next check the checkbox to show all columns so we can add a few columns that are left off by default.  Now scroll to the right and you will notice many columns that could be helpful.  For example, I see DatabaseName, HostName, and NTLoginName.  Place a check in the checkbox for these columns.

Now we will move along to filters.  Click on the Column Filters button.  Notice that the columns you just added are also candidates for filtering.  In this example I am going to select HostName and use my computer name “WHBV53YC1” (You could also use NTUserName and use your login name)

Profile2

Its that simple, you just configured the trace to only capture Stored Procedures and TSQL commands issued by yourself.

Posted in SQLServerPedia Syndication.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Continuing the Discussion

  1. Links for the week – 2009.10.02 | Jeremiah Peschka, SQL Server Developer linked to this post on October 2, 2009

    [...] Developers, use Profiler to profile yourself John Sterrett goes over how to use profiler to profile your own SSMS session. [...]



Some HTML is OK

or, reply to this post via trackback.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes