NSSnapshotSubscriptions (Transact-SQL)
Produces the subscriptions snapshot report for an instance of Microsoft SQL Server Notification Services. The report contains information about the most recent subscription addition for all subscription classes.
| Column Name | Data Type | Description |
|---|---|---|
|
ApplicationName |
nvarchar(255) |
Name of an application. |
|
ApplicationActivationState |
nvarchar(255) |
Activation state of the application. The state can be enabled or disabled. |
|
SubscriptionActivationState |
nvarchar(255) |
Activation state of the subscription APIs for the application. The state can be enabled or disabled. |
|
SubscriptionClassName |
nvarchar(255) |
Name of a subscription class within the application. |
|
LastTimeSubscriptionAdded |
datetime |
Date and time of the last subscription added to the application for the subscription class. |
|
SecondsSinceLastSubscriptionAdded |
int |
Elapsed time, in seconds, since the last subscription was added for the subscription class. |
Notification Services creates the NSSnapshotSubscriptions stored procedure in the instance database when you create the instance. When you update the instance, Notification Services recompiles the stored procedure.
This stored procedure is in the instance schema, which is specified by the SchemaName element of the instance configuration file (ICF). If no schema name is provided, the default schema is dbo.
The result set is ordered by the ApplicationName value, and then by the SubscriptionClassName value.
The following example produces the subscriptions snapshot report for all applications hosted by an instance. In this example, the stored procedure (like all other instance objects) is in the StockInstance schema, as specified in the SchemaName element of the ICF.
EXEC StockInstance.NSSnapshotSubscriptions;
Reference
Notification Services Stored Procedures (Transact-SQL)Other Resources
Notification Services Performance ReportsSchemaName Element (ICF)