SQL Profiler

  • I seem to be having a problem with SQL Profiler.

    The object name column doesn't seem to display anything and half the filters don't work, in particular the database name filter.

  • Profiler is a little unintuitive in this regard -- not all events return all columns, especially the columns one would think should be populated.  In particular, the two you mentioned  ObjectName and DatabaseName are not commonly used.  ObjectName is returned only by SP:CacheMiss, some of the Object events like Object:Created and Object Deleted and some of the Audit events.  DatabaseName is returned only by some of the Security Audit events and not much else.

    Check out Books Online topic "Monitoring with SQL Profiler Event Categories" to get a list of columns returned by each profiler event.  Or you can look at the complete and large matrix at http://www.sqldev.net/misc/SQLTraceEventMatrix.htm.

    As far as filtering, it seems that filters only work on a column if a column value is returned by an event.  So filtering on database name works for a few events.  Instead, filter by DatabaseID, which is returned by just about every event. 

    Hope this helps,

    Scott Thornburg

    Volt Information Sciences

  • Interesting, and I thought objectname was broken as a filter. Thanks for the info, scott.

  • Yes, it is an unusually poor effort from Microsoft.

    One particularly annoying function is that when you script a trace one of the first comments is that you cannot script to a table.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply