SchemaEvents SchemaEvents SchemaEvents Class


The SchemaEvents object represents the settings required for SQL Server schema event notification.

public ref class SchemaEvents
public class SchemaEvents
Public Class SchemaEvents


Handling SMO Events


The SchemaEvents class is accessed through Events property and cannot be created as a stand-alone object.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.


GetEventSelection() GetEventSelection() GetEventSelection()

Returns a set of currently subscribed event notifications.

StartEvents() StartEvents() StartEvents()

Starts receiving events.

StopEvents() StopEvents() StopEvents()

Stops receiving events.

SubscribeToEvents(ObjectEventSet) SubscribeToEvents(ObjectEventSet) SubscribeToEvents(ObjectEventSet)

Specifies the object events to receive.

SubscribeToEvents(ObjectEventSet, ServerEventHandler) SubscribeToEvents(ObjectEventSet, ServerEventHandler) SubscribeToEvents(ObjectEventSet, ServerEventHandler)

Specifies the object events to receive.

UnsubscribeAllEvents() UnsubscribeAllEvents() UnsubscribeAllEvents()

Clear all event settings, and removes all event handlers.

UnsubscribeFromEvents(ObjectEventSet) UnsubscribeFromEvents(ObjectEventSet) UnsubscribeFromEvents(ObjectEventSet)

Clears the specified event setting, and removes all event handlers.


ServerEvent ServerEvent ServerEvent

Specifies the server event handler for schema events.

Applies to