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

ServerEvents Class

The ServerEvents object represents the settings required for SQL Server server-level event notification.

System.Object
  Microsoft.SqlServer.Management.Smo.ServerEvents

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
public sealed class ServerEvents

The ServerEvents type exposes the following members.

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetEventSelectionReturns the currently selected event notifications.
Public methodGetHashCode (Inherited from Object.)
Public methodGetTraceEventSelectionReturns the currently selected event notifications.
Public methodGetType (Inherited from Object.)
Public methodSetCredentialsSets the credentials required by the instance of Microsoft SQL Server.
Public methodStartEventsStarts receiving events.
Public methodStopEventsStops receiving events.
Public methodSubscribeToEvents(ServerEventSet)Specifies the server events to receive.
Public methodSubscribeToEvents(ServerTraceEventSet)Specifies the server trace events to receive.
Public methodSubscribeToEvents(ServerEventSet, ServerEventHandler)Specifies the server events to receive and the event handler that handles the events.
Public methodSubscribeToEvents(ServerTraceEventSet, ServerEventHandler)Specifies the server trace events to receive and the event handler that handles the events.
Public methodToString (Inherited from Object.)
Public methodUnsubscribeAllEventsClears all event settings, and removes all event handlers.
Public methodUnsubscribeFromEvents(ServerEventSet)Clears the specified event settings, and removes all event handlers.
Public methodUnsubscribeFromEvents(ServerTraceEventSet)Clears the specified event settings, and removes all event handlers.
Top
  NameDescription
Public eventServerEventSpecifies the event raised when an event occurs in Server object and the user has subscribed to the events from that object instance.
Top

The ServerEvents 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.