ServerEvents.SubscribeToEvents Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- events
- ServerEventSet
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
- events
- ServerTraceEventSet
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
- events
- ServerEventSet
- 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
- events
- ServerTraceEventSet
- eventHandler
- ServerEventHandler