Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

<EventClassName> View

SQL Server 2005

Notification Services creates one view for each event class defined in an application. This view has the same name as the event class, and is located in the application's schema. For example, if an application has an event class named WeatherData and the application schema is News, the view is News.WeatherData.

You can use this view to submit event data to an event class.

Column Data type Description

EventId

bigint

Event identifier. This is an IDENTITY column. Notification Services determines the Event ID when an event is inserted. If you insert data into this view, the EventId value must be NULL.

EventClassFieldName (1-n)

application-defined

All columns specified in the event class also appear in this view.

When you insert data into this view. Notification Services creates one event batch per insertion. The resulting event provider name, which is stored in the underlying event table, is NULL.

To insert data, the application and subscribers must be enabled.

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

If you have an event class with the fields City, Date, Low, High, and Forecast, you can insert event data into the event class view using the following INSERT statement:

USE TutorialWeather;
GO
INSERT INTO dbo.WeatherData (City, Date, Low, High, Forecast)
VALUES (N'Shoreline', GetDate(), 40, 55, N'Partly Cloudy');
GO

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.