Compartir a través de


Clase Session

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

Jerarquía de herencia

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

Espacio de nombres:  Microsoft.SqlServer.Management.XEvent
Ensamblado:  Microsoft.SqlServer.Management.XEvent (en Microsoft.SqlServer.Management.XEvent.dll)

Sintaxis

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

El tipo Session expone los siguientes miembros.

Constructores

  Nombre Descripción
Método público Session() Initializes a new instance of Session class.
Método público Session(XEStore, String) Initializes a new instance of Session class.

Arriba

Propiedades

  Nombre Descripción
Propiedad protegida AbstractIdentityKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Propiedad pública AutoStart Gets or sets a value indicating whether the AutoStart object is active or not.
Propiedad pública EventRetentionMode Gets or sets the EventRetentionMode object.
Propiedad pública Events Gets the EventCollection of the session.
Propiedad pública ID Gets the ID object.
Propiedad pública IdentityKey Gets the identity key of the session.
Propiedad pública IsRunning Gets a value indicating whether this session is running.
Propiedad pública MaxDispatchLatency Gets or sets the maximum dispatch latency in seconds.
Propiedad pública MaxEventSize Gets or sets the size in KB of the maximum event for the session.
Propiedad pública MaxMemory Gets or sets the maximum memory in KB of the session.
Propiedad pública MemoryPartitionMode Gets or sets the memory partition mode from an enumeration with options for perNode, perCpu, or none.
Propiedad pública Metadata Returns metadata about the instance and its domain. (Se hereda de SfcInstance.)
Propiedad pública Name Gets the name of the Session object.
Propiedad pública Parent Gets or sets the parent XEStore object.
Propiedad pública Properties Returns a collection instance properties. (Se hereda de SfcInstance.)
Propiedad pública StartTime Gets the start time.
Propiedad pública State Gets the state of the object used in Alter function in session.
Propiedad pública Targets Gets the TargetCollection.
Propiedad pública TrackCausality Gets or sets a Boolean value indicating whether the TrackCausality object is activated.
Propiedad pública Urn Returns the uniform resource name of the SfcInstance object. (Se hereda de SfcInstance.)

Arriba

Métodos

  Nombre Descripción
Método público AddEvent(String) Adds a new Event object to the session from fully qualified event name.
Método público AddEvent(EventInfo) Adds a new Event object to the session.
Método público AddTarget(String) Adds a new Target object to the session.
Método público AddTarget(TargetInfo) Adds a new Target object to the session.
Método público Alter Alters the Session object on the server.
Método público Create Creates the Session object on the server.
Método protegido CreateIdentityKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público Discover No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público Drop Drops the Session object on the server.
Método público Equals (Se hereda de Object.)
Método protegido GetChildCollection No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público GetDomain No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público GetHashCode (Se hereda de Object.)
Método públicoMiembro estático GetObjectFactory Gets the SQL Foundation Class object factory.
Método público GetPropertySet Returns the set of properties for the SfcInstance object. (Se hereda de SfcInstance.)
Método público GetType (Se hereda de Object.)
Método protegido GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método protegido InitializeUIPropertyState No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método protegido OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (Se hereda de SfcInstance.)
Método protegido OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (Se hereda de SfcInstance.)
Método público Refresh Refreshes the object's properties by reading them from the server. (Se hereda de SfcInstance.)
Método público RemoveEvent Removes the specified Event object from the session.
Método público RemoveTarget Removes the Target object from the session.
Método protegido ResetKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público ScriptAlter Gets the alteration ISfcScript for the session.
Método público ScriptCreate Gets the creation ISfcScript for the session.
Método público ScriptDrop Gets the drop ISfcScript for the session.
Método público Serialize Serializes the instance to XML. (Se hereda de SfcInstance.)
Método público Start Starts the Session object.
Método público Stop Stops the Session object.
Método público ToString Returns a string representation of the instance Urn. (Se hereda de SfcInstance.)
Método público Validate(String) Validates the specified method name.
Método público Validate(String, array<Object[]) Validates the method specified by the name parameter.

Arriba

Eventos

  Nombre Descripción
Evento público PropertyChanged CLS-compliant event for property changes. (Se hereda de SfcInstance.)
Evento público PropertyMetadataChanged CLS-compliant event for property metadata changes. (Se hereda de SfcInstance.)

Arriba

Campos

  Nombre Descripción
Campo públicoMiembro estático DefaultDispatchLatency Default dispatch latency is 30 seconds.
Campo públicoMiembro estático DefaultMaxMemory The maximum amount of memory by default is 4 MB.
Campo públicoMiembro estático InfiniteDispatchLatency 0 indicates that dispatch latency is infinite.
Campo públicoMiembro estático NotStarted Session is currently not running.

Arriba

Implementaciones de interfaces explícitas

  Nombre Descripción
Implementación de interfaces explícitasMétodo privado ISfcDiscoverObject.Discover Discovers or alters dependency actions and events in the Session object.

Arriba

Comentarios

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

Seguridad para subprocesos

Cualquier miembro público static (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Vea también

Referencia

Espacio de nombres Microsoft.SqlServer.Management.XEvent