Why Doesn't Profiler Capture ObjectId?

I'm using SQL Server 2000 Profiler to monitor several applications, and I don't understand why I'm not seeing data for some of the events that I've requested traces for. For example, my trace includes the RPC:Completed event (from the Stored Procedures event class), and I should be seeing values for the ObjectId data column. The trace runs, but I don't see any values for the ObjectId data column associated with the RPC:Completed event. Why are many of the data columns I've selected empty for some of the events I've captured?

The short answer to your question is that Profiler doesn't capture ObjectId for the RPC:Completed event. The Profiler GUI doesn't explain this quirk, but a one-to-one match doesn't exist between all Profiler events and data columns. Thus, Profiler doesn't capture every data column for every event. For a good description of which data columns Profiler populates for which events, see the SQL Server Books Online (BOL) topic "Monitoring with SQL Profiler Event Categories." This BOL topic also includes definitions of what the value in a data column represents for a particular event. This information is important because the definition of a data column can vary from one event to another. For example, the Integer Data data column of the Lock:Deadlock event is defined as "Deadlock number. Numbers are assigned, beginning with zero, when the server is started and incremented for each deadlock." But the Integer Data data column of the SP:StmtCompleted event is defined as "Actual rows returned by the statement." If you use Profiler regularly (as you should), I encourage you to read this section of BOL carefully—it will help you think of new ways to trace your applications.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.