Partilhar via


NSSubscriberView

Notification Services creates one subscriber view per Notification Services instance. This view is located in the instance schema of the instance database. For example, the instance configuration specifies that the schema name is Tutorial, the view is Tutorial.NSSubscriberView.

You can use this view to add, modify, and delete subscribers to an instance of Notification Services. For deployed applications, consider developing a subscription management interface using the subscription management API. For more information, see Developing Subscription Management Interfaces.

View Columns

Column Data type Description

SubscriberId

nvarchar(255)

The subscriber identifier. This value is an identifier of your choice. It must be unique within the Notification Services instance.

Enabled

bit

Determines if the subscriber record is enabled (1) or disabled (0). If it is disabled, the subscriber's subscriptions will not generate notifications.

Created

datetime

The date and time the subscriber record was created. Do not insert values into this column. Notification Services sets this value when you add the subscriber.

Updated

datetime

The date and time the subscriber record was modified. Do not insert values into this column. Notification Services sets this value when you update the subscriber.

Remarks

To insert data, the subscribers must be enabled.

Permissions

This view is available to members of the NSEventProvider, NSRunService, and db_owner database roles and the sysadmin server role.

Examples

Use the following query to insert a subscriber into the Tutorial instance, which uses the TutorialNSMain database:

USE TutorialNSMain;
GO
INSERT INTO dbo.NSSubscriberView (SubscriberId, Enabled)
VALUES (N'danw@adventure-works.com', 1);
GO

See Also

Reference

INSERT (Transact-SQL)
Notification Services Views

Other Resources

Subscription Management Architecture
Developing Subscription Management Interfaces
Enabling and Disabling Instances, Applications, or Components

Help and Information

Getting SQL Server 2005 Assistance