Filter Server Process IDs (SPIDs) in a Trace (SQL Server Profiler)
This topic describes how to filter server process identifiers (SPIDs) in a trace by using SQL Server Profiler.
To filter system IDs in a trace
On the File menu, click New Trace, and then connect to an instance of SQL Server.
The Trace Propertiesdialog box appears.
if Start tracing immediately after making connectionis selected, the Trace Propertiesdialog box fails to appear, and the trace begins instead. To turn off this setting, on the Toolsmenu, click Options, and clear the Start tracing immediately after making connection check box.
In the Trace name box, type a name for the trace.
In the Use the templatename list, select a trace template.
Optionally, specify a destination file or table in which to save the trace results.
On the Events Selectiontab, click the SPIDcolumn heading to launch the Edit Filter dialog box. You can also right-click the column heading and choose Edit Column Filter. If the SPID column does not appear, check the Show all columns box.
In the Edit Filter dialog box, expand the appropriate comparison operator, and enter a SPID as a value for the comparison.