Sdílet prostřednictvím


<EventClassName> View

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.

View Columns

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.

Remarks

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.

Permissions

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

Examples

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

See Also

Reference

INSERT (Transact-SQL)
Notification Services Views

Other Resources

Defining Event Providers
Custom Event Providers
Event Collection Architecture
Defining Event Providers
Enabling and Disabling Instances, Applications, or Components

Help and Information

Getting SQL Server 2005 Assistance