Databases Reference
In-Depth Information
Figure 5-2
Event number: Writing a script or stored procedure for a server-side trace requires using an
event number to reference an event class. Corresponding event numbers can be found with
respect to event classes in the SQL Book Online (BOL) under the system-stored procedure
sp_trace_setevent. For example, the event class RPC:Completed corresponds to event
number 10 (see Table 5-1).
Data column: A data column is associated with an event class captured in a trace. It is an
attribute of an event class. A single event class will have multiple related data columns. SQL
Server 2005 Profiler has an internal built-in logic that handles data column dependencies; this
logic only displays relevant data columns for a given event class. Because the event class
determines the type of data that can be collected, not all data columns are applicable to all event
classes. For example, in the SQL:BatchStarting event class, the CPU, Reads, Writes, and Duration
data columns do not contain values because they are not applicable to the SQL:BatchStarting
event class. However, these data columns are applicable to the SQL:BatchCompleted event class.
Trace: Typically, trace refers to a collection of traceable event classes and data that are returned
by an instance of SQL Server. Trace, as an action, refers to collecting and monitoring event classes
in an instance of SQL Server. A trace captures data based on selected event classes, data columns,
and filters. SQL Server provides two ways to trace an instance of SQL Server: you can trace with
SQL Server Profiler, or you can trace using system-stored procedures.
Search WWH ::




Custom Search