Using SQL Trace to Troubleshoot Query Notifications

SQL Trace provides several events that help developers and administrators monitor and troubleshoot query notifications. This topic describes the query notification events.

Event Classes

The following event classes report information about query notifications:

  • QN:Dynamics

    The QN:Dynamics event reports information about the background activity that the Database Engine performs to support query notifications. Within the Database Engine, a background thread monitors subscription time-outs, pending subscriptions to be fired, and parameter table destruction.

  • QN:Parameter Table

    The QN:Parameter Table event reports information about the operations required to create, keep reference counts for, and drop the internal tables that store parameter information. This event also reports the internal activity to reset the usage count for a parameter table.

  • QN:Template

    The QN:Template event reports information on the internal use of query templates. Query templates are the mechanism that the Database Engine uses to share definitions of a query for notification. These templates are created along with parameter tables. The Database Engine creates an event of this type when a query template is created, used, or destroyed.

  • QN:Subscription

    The QN:Subscription event reports information on notification subscriptions. For example, this event reports when a subscription is registered, when a subscription is deleted or destroyed, and reports information about Service Broker operations that support query notification subscriptions.

For detailed information about each of these event classes, see Query Notifications Event Category.