Subscriptions (NtMd and PendingNtMd) Tables

NtMd Table

The NtMd table is used for subscriptions and notifications. It specifies whether a user is subscribed to a list, as well as what changes the user wants to be notified about and when. There is one of these tables for the virtual server's database.

Column Name Data Type Description
EvtID Integer The primary key of the Subscriptions table.
UrlID Integer The URL for which the subscription is made, which is a lookup to the URLs (DocMd) table.
Owner Text A string specifying the username of the user who made the subscription. This field is not a lookup into the People (UserInfo) table.
EventType Integer An enumeration governing which type of event should be matched by the subscription (for example, when a file is deleted, when a list item is added, when a comment is closed).
ActionType Integer The type of action to be performed when a notification is matched. For the current version of SharePoint Team Services from Microsoft, this value is always 1, denoting that the notification will be sent by e-mail.
Email Text The e-mail address to which the notification should be sent.
NotifType Integer Specifies the frequency at which the notification mail should be sent. The following values are possible:

0 (zero) — immediately

1 — daily

2 — weekly

Notifications for a given e-mail address at a given frequency are batched together. The precise frequency of the notifications is governed by the scheduling of the timer jobs from the administration pages.

LCID Integer The server-side locale ID of the SharePoint Team Services version on which the subscription is made.
Criteria Integer A flags field, where various bits govern the scope of events that are matched by this subscription (for example, changes to this file, changes to this folder and its immediate children, changes to this list, changes made by a given user).
Title Text The internal name of the list subscribed to in list subscriptions.
SavedBy Text A flag that allows a user to subscribe to changes made by another user. This field uses the user's account name (for example, REDMOND\Somebody).
RootUrl Text The absolute URL for the virtual server on which the subscription was made, which is not a lookup to the URLs (DocMd) table. Used for certain URL normalizations performed in the timer, where the code is devoid of a Web or virtual server context.
TimeLastModified DateTime The date and time that the subscription was last modified.
TimeCreated DateTime The date and time that the subscription was created.

PendingNtMd Table

The PendingNtMd table contains pending notifications to be sent. For example, if the user requests notification once a day, this table holds the queued notifications until they're sent at day's end. There is one of these tables for the virtual server's database.

This table contains both a lookup to a primary key of the NtMd table and a number of fields that are identical to ones in the NtMd table. As a cache for events to be sent out, this table, combined with the NtMd table, makes it possible to subscribe to an item, to put a notification about the subscription in queue, and then to delete the subscription, yet still receive a valid notification mail.

Column Name Data Type Description
Email Text The e-mail address to which the notification will be sent.
EventType Integer Specifies the event that is matched by a subscription. This field is based on the same enumeration as the EventType field in the NtMd table, but in this case the field applies to all changes of a particular type (for example, all list changes or all document changes). In this case, the PendingNtMd entry represents the exact change matched (for example, a comment was added, a list item was modified, a document was renamed).
SourceUrl Text The server-relative URL that contains the original URL for the item involved in this subscription. This field is not a lookup to the URLs (DocMd) table.
TargetUrl Text In the case of a move event, the server-relative URL to which the item was moved.
LCID Integer The server-side locale ID for the subscription (see LCID in the NtMd table) that a given event matches.
EventTime DateTime The time at which the event was fired and the notification was queued.
NotifType Integer Specifies the frequency at which the notification mail should be sent. The following values are possible:

0 (zero) — immediately

1 — daily

2 — weekly

Notifications for a given e-mail address at a given frequency are batched together. The precise frequency of the notifications is governed by the scheduling of the timer jobs from the administration pages.

Title Text The internal name of the list subscribed to in list subscriptions.
SavedBy Text The account username of the person who fired the event (for example, REDMOND\Somebody).
EvtID Integer Denotes the subscription to which the notification belongs (a lookup into the NtMd table).
Criteria Integer A flags field, where various bits govern the scope of events that are matched by this subscription (for example, changes to this file, changes to this folder and its immediate children, changes to this list, changes made by a given user).
RootUrl Text The absolute URL for the virtual server on which the subscription was made, which is not a lookup to the URLs (DocMd) table. Used for certain URL normalizations performed in the timer, where the code is devoid of a Website or virtual server context.

See Also

Overview of the SharePoint Team Services Database

List Data Types

Using SQL with the SharePoint Team Services Database