Session 类

Represents a row in sys.server_event_sessions and includes data from sys.dm_xe_sessions if running.

继承层次结构

System.Object
  Microsoft.SqlServer.Management.Sdk.Sfc.SfcInstance
    Microsoft.SqlServer.Management.XEvent.Session

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

语法

声明
Public NotInheritable Class Session _
    Inherits SfcInstance _
    Implements ISfcCreatable, ICreatable, ISfcAlterable, IAlterable,  _
    ISfcDroppable, IDroppable, ISfcValidate, ISfcDiscoverObject
用法
Dim instance As Session
public sealed class Session : SfcInstance, 
    ISfcCreatable, ICreatable, ISfcAlterable, IAlterable, ISfcDroppable, 
    IDroppable, ISfcValidate, ISfcDiscoverObject
public ref class Session sealed : public SfcInstance, 
    ISfcCreatable, ICreatable, ISfcAlterable, IAlterable, ISfcDroppable, 
    IDroppable, ISfcValidate, ISfcDiscoverObject
[<SealedAttribute>]
type Session =  
    class 
        inherit SfcInstance 
        interface ISfcCreatable 
        interface ICreatable 
        interface ISfcAlterable 
        interface IAlterable 
        interface ISfcDroppable 
        interface IDroppable 
        interface ISfcValidate 
        interface ISfcDiscoverObject 
    end
public final class Session extends SfcInstance implements ISfcCreatable, ICreatable, ISfcAlterable, IAlterable, ISfcDroppable, IDroppable, ISfcValidate, ISfcDiscoverObject

Session 类型公开以下成员。

构造函数

  名称 说明
公共方法 Session() Initializes a new instance of Session class.
公共方法 Session(XEStore, String) Initializes a new instance of Session class.

页首

属性

  名称 说明
受保护属性 AbstractIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共属性 AutoStart Gets or sets a value indicating whether the AutoStart object is active or not.
公共属性 EventRetentionMode Gets or sets the EventRetentionMode object.
公共属性 Events Gets the EventCollection of the session.
公共属性 ID Gets the ID object.
公共属性 IdentityKey Gets the identity key of the session.
公共属性 IsRunning Gets a value indicating whether this session is running.
公共属性 MaxDispatchLatency Gets or sets the maximum dispatch latency in seconds.
公共属性 MaxEventSize Gets or sets the size in KB of the maximum event for the session.
公共属性 MaxMemory Gets or sets the maximum memory in KB of the session.
公共属性 MemoryPartitionMode Gets or sets the memory partition mode from an enumeration with options for perNode, perCpu, or none.
公共属性 Metadata Returns metadata about the instance and its domain. (从 SfcInstance 继承。)
公共属性 Name Gets the name of the Session object.
公共属性 Parent Gets or sets the parent XEStore object.
公共属性 Properties Returns a collection instance properties. (从 SfcInstance 继承。)
公共属性 StartTime Gets the start time.
公共属性 State Gets the state of the object used in Alter function in session.
公共属性 Targets Gets the TargetCollection.
公共属性 TrackCausality Gets or sets a Boolean value indicating whether the TrackCausality object is activated.
公共属性 Urn Returns the uniform resource name of the SfcInstance object. (从 SfcInstance 继承。)

页首

方法

  名称 说明
公共方法 AddEvent(String) Adds a new Event object to the session from fully qualified event name.
公共方法 AddEvent(EventInfo) Adds a new Event object to the session.
公共方法 AddTarget(String) Adds a new Target object to the session.
公共方法 AddTarget(TargetInfo) Adds a new Target object to the session.
公共方法 Alter Alters the Session object on the server.
公共方法 Create Creates the Session object on the server.
受保护方法 CreateIdentityKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 Discover 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 Drop Drops the Session object on the server.
公共方法 Equals (从 Object 继承。)
受保护方法 GetChildCollection 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetDomain 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法静态成员 GetObjectFactory Gets the SQL Foundation Class object factory.
公共方法 GetPropertySet Returns the set of properties for the SfcInstance object. (从 SfcInstance 继承。)
公共方法 GetType (从 Object 继承。)
受保护方法 GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 InitializeUIPropertyState 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
受保护方法 OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (从 SfcInstance 继承。)
受保护方法 OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (从 SfcInstance 继承。)
公共方法 Refresh Refreshes the object's properties by reading them from the server. (从 SfcInstance 继承。)
公共方法 RemoveEvent Removes the specified Event object from the session.
公共方法 RemoveTarget Removes the Target object from the session.
受保护方法 ResetKey 不要在您的代码中直接引用此成员。它支持 SQL Server 基础结构。 (从 SfcInstance 继承。)
公共方法 ScriptAlter Gets the alteration ISfcScript for the session.
公共方法 ScriptCreate Gets the creation ISfcScript for the session.
公共方法 ScriptDrop Gets the drop ISfcScript for the session.
公共方法 Serialize Serializes the instance to XML. (从 SfcInstance 继承。)
公共方法 Start Starts the Session object.
公共方法 Stop Stops the Session object.
公共方法 ToString Returns a string representation of the instance Urn. (从 SfcInstance 继承。)
公共方法 Validate(String) Validates the specified method name.
公共方法 Validate(String, array<Object[]) Validates the method specified by the name parameter.

页首

事件

  名称 说明
公共事件 PropertyChanged CLS-compliant event for property changes. (从 SfcInstance 继承。)
公共事件 PropertyMetadataChanged CLS-compliant event for property metadata changes. (从 SfcInstance 继承。)

页首

字段

  名称 说明
公共字段静态成员 DefaultDispatchLatency Default dispatch latency is 30 seconds.
公共字段静态成员 DefaultMaxMemory The maximum amount of memory by default is 4 MB.
公共字段静态成员 InfiniteDispatchLatency 0 indicates that dispatch latency is infinite.
公共字段静态成员 NotStarted Session is currently not running.

页首

显式接口实现

  名称 说明
显式接口实现私有方法 ISfcDiscoverObject.Discover Discovers or alters dependency actions and events in the Session object.

页首

注释

The Session object is the main object that user code interacts with.

线程安全

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

请参阅

参考

Microsoft.SqlServer.Management.XEvent 命名空间