TABLE 1: Procedures Needed to Define a Server-Side Trace
Procedure Name Function
sp_trace_create Sets up the trace and configures a file to keep the captured events; returns a trace ID number that the other procedures then use to further define and manipulate the trace.
sp_trace_setevent Sets up event capture (once for every data column for every event the trace captures).
sp_trace_setfilter Sets up filter definition (once for each filter you define on an event data column).
sp_trace_setstatus Starts, stops, and removes a trace.
sp_trace_generateevent Generates user-defined events (optional).