NSSnapshotApplications (Transact-SQL)

Produces the applications snapshot report, which provides information about the current state of all applications hosted by an instance.

Syntax

[ schema_name . ] NSSnapshotApplications

Return Code Values

0 (success) or 1 (failure)

Result Sets

Column Name Data Type Description

ApplicationName

nvarchar(255)

Name of an application.

ApplicationActivationState

nvarchar(255)

Activation state for the application. The state can be enabled or disabled.

GeneratorActivationState

nvarchar(255)

Activation state for the application generator component. The state can be enabled, enabled pending, disabled, or disabled pending.

QuantumsBehind

int

Number of quantum durations the generator is running behind. The count includes complete quantum durations that have passed, but have not yet been started for processing.

For example, if the quantum duration is 5 seconds and the QuantumsBehind value is 2, at least 10 seconds but not more than 15 seconds have passed since the last quantum was processed.

GeneratorSystemName

nvarchar(255)

Name of the computer system running the generator service.

NotificationClassName

nvarchar(255)

Name of a notification class within the application.

LastTimeNotificationBatchGenerated

datetime

Date and time of the last notification batch to be generated for the notification class.

SecondsSinceNotificationBatchGenerated

int

Elapsed time, in seconds, since the last notification batch was generated.

LastNotificationBatchNotificationCount

bigint

The number of notifications generated in the last batch for the notification class.

LastTimeNotificationBatchDistributed

datetime

Date and time the last notification batch was picked up for distribution.

SecondsSinceNotificationBatchDistributed

int

Elapsed time, in seconds, since a notification batch has been picked up for distribution.

VacuumerSystemName

nvarchar(255)

Name of the computer system running the vacuuming service.

LastTimeVacuumingOccurred

datetime

Date and time of the last successful vacuuming of notifications and events.

SecondsSinceLastVacuum

int

Elapsed time, in seconds, since the vacuuming process has run.

LastTimeVacuumEventCount

bigint

Number of events vacuumed in the last vacuuming.

LastTimeVacuumNotificationCount

bigint

Number of notifications vacuumed in the last vacuuming.

SubscriberActivationState

nvarchar(255)

Activation state for the subscriber APIs. The state can be enabled or disabled.

LastTimeSubscriberAdded

datetime

Date and time the newest subscriber was added to the instance.

SecondsSinceSubscriberAdded

int

Elapsed time, in seconds, since the newest subscriber was added to the instance.

Remarks

Microsoft SQL Server Notification Services creates the NSSnapshotApplications 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 NotificationClassName value.

Permissions

Execute permissions default to members of the NSAnalysis database role, db_owner fixed database role, and sysadmin fixed server role.

Examples

The following example produces the application snapshot report for all applications hosted by an instance. The instance uses the default database settings, which places all instance objects in the dbo schema.

EXEC dbo.NSSnapshotApplications;

See Also

Reference

Notification Services Stored Procedures (Transact-SQL)

Other Resources

Notification Services Performance Reports
SchemaName Element (ICF)

Help and Information

Getting SQL Server 2005 Assistance