QN:Subscription Event Class


Applies To: SQL Server 2016

The QN:Subscription event reports information on notification subscriptions.

Data columnTypeDescriptionColumn numberFilterable
ApplicationNamenvarcharThe name of the client application that created the connection to an instance of SQL Server. This column is populated with the values passed by the application rather than the displayed name of the program.10Yes
ClientProcessIDintThe ID assigned by the host computer to the process where the client application is running. This data column is populated if the client process ID is provided by the client.9Yes
DatabaseIDintThe ID of the database specified by the USE database statement, or the ID of the default database if no USE databasestatement has been issued for a given instance. SQL Server Profiler displays the name of the database if the Server Name data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function.3Yes
DatabaseNamenvarcharThe name of the database in which the user statement is running.35Yes
EventClassintType of event = 199.27No
EventSequenceintSequence number for this event.51No
EventSubClassnvarcharThe type of event subclass, providing further information about each event class. This column may contain the following values:

 Subscription registered: Indicates when the query notification subscription is successfully registered in the database.

 Subscription rewound: Indicates when the Database Engine receives a subscription request that exactly matches an existing subscription. In this case, the Database Engine sets the time-out value of the existing subscription to the time-out specified in the new subscription request.

 Subscription fired: Indicates when a notification subscription produces a notification message.

 Firing failed with broker error: Indicates when a notification message fails due to a Service Broker error.

 Firing failed without broker error: Indicates when a notification message fails but is not due to a Service Broker error.

 Broker error intercepted: Indicates that Service Broker delivered an error in the conversation that the query notification uses.

 Subscription deletion attempt: Indicates that the Database Engine attempted to delete an expired subscription to free up resources.

 Subscription deletion failed: Indicates that the attempt to delete an expired subscription has failed. The Database Engine will automatically reschedule the subscription for deletion to free up resources.

 Subscription destroyed: Indicates that the Database Engine successfully deleted an expired subscription.
GroupIDintID of the workload group where the SQL Trace event fires.66Yes
HostNamenvarcharThe name of the computer on which the client is running. This data column is populated if the host name is provided by the client. To determine the host name, use the HOST_NAME function.8Yes
IsSystemintIndicates whether the event occurred on a system process or a user process.

0 = user

1 = system
LoginNamenvarcharThe name of the login of the user (either SQL Server security login or the Windows login credentials in the form of DOMAIN\Username).11No
LoginSIDimageThe security identification number (SID) of the logged-in user. You can find this information in the sys.server_principals catalog view. Each SID is unique for each login in the server.41Yes
NTDomainNamenvarcharThe Windows domain to which the user belongs.7Yes
NTUserNamenvarcharThe name of the user that owns the connection that generated this event.6Yes
RequestIDintIdentifier of the request that contains the statement.49Yes
ServerNamenvarcharThe name of the instance of SQL Server being traced.26No
SessionLoginNamenvarcharLogin name of the user that originated the session. For example, if an application connects to SQL Server using Login1 and executes a statement as Login2, SessionLoginName shows "Login1" and LoginName shows "Login2". This column displays both SQL Server and Windows logins.64Yes
SPIDintID of the session on which the event occurred.12Yes
StartTimedatetimeTime at which the event started, if available.14Yes
TextDatantextReturns an XML document containing information specific to this event. This document conforms to the XML schema available at the SQL Server Query Notification Profiler Event Schema page.1Yes

Community Additions