Udostępnij za pośrednictwem


NSSubscriberDeviceView

Notification Services creates one NSSubscriberDeviceView view for each Notification Services instance. This view contains information about the subscriber devices for all subscribers. You can use this view to review the subscriber devices for your Notification Services instance, and to insert, update, and delete devices for subscribers.

View Columns

The information about subscriber devices that the NSSubscriberDeviceView view contains is shown in the following table.

Column Data type Description

SubscriberId

nvarchar(255)

The subscriber identifier. The same subscriber can appear in this view multiple times if they have defined multiple devices.

Enabled

bit

If the value is 1, the subscriber is enabled and can receive notifications. Do not insert values into this column.

Created

datetime

The date and time the subscriber record was added to the instance of Notification Services. Do not insert values into this column.

Updated

datetime

The date and time the subscriber record was last updated. Do not insert values into this column.

DeviceName

nvarchar(255)

The name of the destination device for the notification. The combination of SubscriberId and DeviceName must be unique within this view.

DeviceTypeName

nvarchar(255)

The type of destination device, such as e-mail or file.

DeviceAddress

nvarchar(255)

The address to send the notification to, such as an e-mail address.

DeliveryChannelName

nvarchar(255)

The name of the delivery channel used to send the notification.

Remarks

The NSSubscriberDeviceView view is located in the instance database. If the instance configuration specifies an instance schema, the view is located in that schema. Otherwise the view is in the dbo schema.

Permissions

The SELECT permission on this view is available to members of the sysadmin and db_owner server roles. It is also available to the NSAnalysis, NSDistributor, NSEventProvider, NSGenerator, NSReader, NSRunService, NSSubscriberAdmin, and NSVacuum Notification Services database roles.

INSERT, UPDATE, and DELETE permissions on this view are granted to members of the NSSubscriberAdmin database role.

Examples

Run the following query to view all data in NSSubscriberDeviceView.

USE StockInstanceNSMain;
GO
SELECT * FROM NSSubscriberDeviceView;
GO

Run the following query to insert a subscriber device into NSSubscriberDeviceView.

USE TutorialNSMain;
GO
INSERT INTO dbo.NSSubscriberDeviceView 
(SubscriberId, DeviceName, DeviceTypeName, 
    DeviceAddress, DeliveryChannelName)
VALUES (N'TestUser1', N'Work e-mail', N'e-mail', 
    N'danw@adventure-works.com', N'FileChannel');
GO

See Also

Reference

Notification Services Views

Other Resources

Subscription Management Architecture
Developing Subscription Management Interfaces

Help and Information

Getting SQL Server 2005 Assistance