ServerEvents 类

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

继承层次结构

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

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public NotInheritable Class ServerEvents
用法
Dim instance As ServerEvents
public sealed class ServerEvents
public ref class ServerEvents sealed
[<SealedAttribute>]
type ServerEvents =  class end
public final class ServerEvents

ServerEvents 类型公开以下成员。

方法

  名称 说明
公共方法 Equals (从 Object 继承。)
受保护方法 Finalize (从 Object 继承。)
公共方法 GetEventSelection Returns the currently selected event notifications.
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetTraceEventSelection Returns the currently selected event notifications.
公共方法 GetType (从 Object 继承。)
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法 SetCredentials Sets the credentials required by the instance of Microsoft SQL Server.
公共方法 StartEvents Starts receiving events.
公共方法 StopEvents Stops receiving events.
公共方法 SubscribeToEvents(ServerEventSet) Specifies the server events to receive.
公共方法 SubscribeToEvents(ServerTraceEventSet) Specifies the server trace events to receive.
公共方法 SubscribeToEvents(ServerEventSet, ServerEventHandler) Specifies the server events to receive and the event handler that handles the events.
公共方法 SubscribeToEvents(ServerTraceEventSet, ServerEventHandler) Specifies the server trace events to receive and the event handler that handles the events.
公共方法 ToString (从 Object 继承。)
公共方法 UnsubscribeAllEvents Clears all event settings, and removes all event handlers.
公共方法 UnsubscribeFromEvents(ServerEventSet) Clears the specified event settings, and removes all event handlers.
公共方法 UnsubscribeFromEvents(ServerTraceEventSet) Clears the specified event settings, and removes all event handlers.

页首

事件

  名称 说明
公共事件 ServerEvent Specifies the event raised when an event occurs in Server object and the user has subscribed to the events from that object instance.

页首

注释

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

Thread Safety

此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。不保证所有实例成员都是线程安全的。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。