Freigeben über


Session-Klasse

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

Vererbungshierarchie

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

Namespace:  Microsoft.SqlServer.Management.XEvent
Assembly:  Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)

Syntax

'Declaration
Public NotInheritable Class Session _
    Inherits SfcInstance _
    Implements ISfcCreatable, ICreatable, ISfcAlterable, IAlterable,  _
    ISfcDroppable, IDroppable, ISfcValidate, ISfcDiscoverObject
'Usage
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

Der Session-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode Session() Initializes a new instance of Session class.
Öffentliche Methode Session(XEStore, String) Initializes a new instance of Session class.

Zum Anfang

Eigenschaften

  Name Beschreibung
Geschützte Eigenschaft AbstractIdentityKey Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Eigenschaft AutoStart Gets or sets a value indicating whether the AutoStart object is active or not.
Öffentliche Eigenschaft EventRetentionMode Gets or sets the EventRetentionMode object.
Öffentliche Eigenschaft Events Gets the EventCollection of the session.
Öffentliche Eigenschaft ID Gets the ID object.
Öffentliche Eigenschaft IdentityKey Gets the identity key of the session.
Öffentliche Eigenschaft IsRunning Gets a value indicating whether this session is running.
Öffentliche Eigenschaft MaxDispatchLatency Gets or sets the maximum dispatch latency in seconds.
Öffentliche Eigenschaft MaxEventSize Gets or sets the size in KB of the maximum event for the session.
Öffentliche Eigenschaft MaxMemory Gets or sets the maximum memory in KB of the session.
Öffentliche Eigenschaft MemoryPartitionMode Gets or sets the memory partition mode from an enumeration with options for perNode, perCpu, or none.
Öffentliche Eigenschaft Metadata Returns metadata about the instance and its domain. (Geerbt von SfcInstance.)
Öffentliche Eigenschaft Name Gets the name of the Session object.
Öffentliche Eigenschaft Parent Gets or sets the parent XEStore object.
Öffentliche Eigenschaft Properties Returns a collection instance properties. (Geerbt von SfcInstance.)
Öffentliche Eigenschaft StartTime Gets the start time.
Öffentliche Eigenschaft State Gets the state of the object used in Alter function in session.
Öffentliche Eigenschaft Targets Gets the TargetCollection.
Öffentliche Eigenschaft TrackCausality Gets or sets a Boolean value indicating whether the TrackCausality object is activated.
Öffentliche Eigenschaft Urn Returns the uniform resource name of the SfcInstance object. (Geerbt von SfcInstance.)

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode AddEvent(String) Adds a new Event object to the session from fully qualified event name.
Öffentliche Methode AddEvent(EventInfo) Adds a new Event object to the session.
Öffentliche Methode AddTarget(String) Adds a new Target object to the session.
Öffentliche Methode AddTarget(TargetInfo) Adds a new Target object to the session.
Öffentliche Methode Alter Alters the Session object on the server.
Öffentliche Methode Create Creates the Session object on the server.
Geschützte Methode CreateIdentityKey Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Methode Discover Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Methode Drop Drops the Session object on the server.
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode GetChildCollection Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Methode GetDomain Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche MethodeStatisches Element GetObjectFactory Gets the SQL Foundation Class object factory.
Öffentliche Methode GetPropertySet Returns the set of properties for the SfcInstance object. (Geerbt von SfcInstance.)
Öffentliche Methode GetType (Geerbt von Object.)
Geschützte Methode GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Geschützte Methode InitializeUIPropertyState Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Geschützte Methode OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (Geerbt von SfcInstance.)
Geschützte Methode OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (Geerbt von SfcInstance.)
Öffentliche Methode Refresh Refreshes the object's properties by reading them from the server. (Geerbt von SfcInstance.)
Öffentliche Methode RemoveEvent Removes the specified Event object from the session.
Öffentliche Methode RemoveTarget Removes the Target object from the session.
Geschützte Methode ResetKey Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SfcInstance.)
Öffentliche Methode ScriptAlter Gets the alteration ISfcScript for the session.
Öffentliche Methode ScriptCreate Gets the creation ISfcScript for the session.
Öffentliche Methode ScriptDrop Gets the drop ISfcScript for the session.
Öffentliche Methode Serialize Serializes the instance to XML. (Geerbt von SfcInstance.)
Öffentliche Methode Start Starts the Session object.
Öffentliche Methode Stop Stops the Session object.
Öffentliche Methode ToString Returns a string representation of the instance Urn. (Geerbt von SfcInstance.)
Öffentliche Methode Validate(String) Validates the specified method name.
Öffentliche Methode Validate(String, array<Object[]) Validates the method specified by the name parameter.

Zum Anfang

Ereignisse

  Name Beschreibung
Öffentliches Ereignis PropertyChanged CLS-compliant event for property changes. (Geerbt von SfcInstance.)
Öffentliches Ereignis PropertyMetadataChanged CLS-compliant event for property metadata changes. (Geerbt von SfcInstance.)

Zum Anfang

Felder

  Name Beschreibung
Öffentliches FeldStatisches Element DefaultDispatchLatency Default dispatch latency is 30 seconds.
Öffentliches FeldStatisches Element DefaultMaxMemory The maximum amount of memory by default is 4 MB.
Öffentliches FeldStatisches Element InfiniteDispatchLatency 0 indicates that dispatch latency is infinite.
Öffentliches FeldStatisches Element NotStarted Session is currently not running.

Zum Anfang

Explizite Schnittstellenimplementierungen

  Name Beschreibung
Explizite SchnittstellenimplementierungPrivate Methode ISfcDiscoverObject.Discover Discovers or alters dependency actions and events in the Session object.

Zum Anfang

Hinweise

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

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Management.XEvent-Namespace