Compartilhar via


ServerEvents.SubscribeToEvents Method

Definition

Overloads

SubscribeToEvents(ServerEventSet)

Subscribes to a set of events on a server. Notifications for those events will be raised using a default handler on this class. Each time this method is called a new set of events is added to already subscribed events.

SubscribeToEvents(ServerTraceEventSet)

Subscribes to a set of trace events on a server. Notifications for those events will be raised using a default handler on this class. Each time this method is called a new set of events is added to already subscribed events.

SubscribeToEvents(ServerEventSet, ServerEventHandler)

Subscribes to a set of events on a server. Notifications for those events will be raised using an event handler provided to this method. Each time this method is called a new set of events is added to already subscribed events. If an event is already subscribed its exisitng handler will be replaced by the new handler passed to this method.

SubscribeToEvents(ServerTraceEventSet, ServerEventHandler)

Subscribes to a set of trace events on a server. Notifications for those events will be raised using an event handler provided to this method. Each time this method is called a new set of events is added to already subscribed events. If an event is already subscribed its exisitng handler will be replaced by the new handler passed to this method.

SubscribeToEvents(ServerEventSet)

Subscribes to a set of events on a server. Notifications for those events will be raised using a default handler on this class. Each time this method is called a new set of events is added to already subscribed events.

public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ServerEventSet events);
member this.SubscribeToEvents : Microsoft.SqlServer.Management.Smo.ServerEventSet -> unit
Public Sub SubscribeToEvents (events As ServerEventSet)

Parameters

Applies to

SubscribeToEvents(ServerTraceEventSet)

Subscribes to a set of trace events on a server. Notifications for those events will be raised using a default handler on this class. Each time this method is called a new set of events is added to already subscribed events.

public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ServerTraceEventSet events);
member this.SubscribeToEvents : Microsoft.SqlServer.Management.Smo.ServerTraceEventSet -> unit
Public Sub SubscribeToEvents (events As ServerTraceEventSet)

Parameters

Applies to

SubscribeToEvents(ServerEventSet, ServerEventHandler)

Subscribes to a set of events on a server. Notifications for those events will be raised using an event handler provided to this method. Each time this method is called a new set of events is added to already subscribed events. If an event is already subscribed its exisitng handler will be replaced by the new handler passed to this method.

public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ServerEventSet events, Microsoft.SqlServer.Management.Smo.ServerEventHandler eventHandler);
member this.SubscribeToEvents : Microsoft.SqlServer.Management.Smo.ServerEventSet * Microsoft.SqlServer.Management.Smo.ServerEventHandler -> unit
Public Sub SubscribeToEvents (events As ServerEventSet, eventHandler As ServerEventHandler)

Parameters

eventHandler
ServerEventHandler

Applies to

SubscribeToEvents(ServerTraceEventSet, ServerEventHandler)

Subscribes to a set of trace events on a server. Notifications for those events will be raised using an event handler provided to this method. Each time this method is called a new set of events is added to already subscribed events. If an event is already subscribed its exisitng handler will be replaced by the new handler passed to this method.

public void SubscribeToEvents (Microsoft.SqlServer.Management.Smo.ServerTraceEventSet events, Microsoft.SqlServer.Management.Smo.ServerEventHandler eventHandler);
member this.SubscribeToEvents : Microsoft.SqlServer.Management.Smo.ServerTraceEventSet * Microsoft.SqlServer.Management.Smo.ServerEventHandler -> unit
Public Sub SubscribeToEvents (events As ServerTraceEventSet, eventHandler As ServerEventHandler)

Parameters

eventHandler
ServerEventHandler

Applies to