Export (0) Print
Expand All

Session Class

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

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)

public sealed class Session : SfcInstance, 
	ISfcCreatable, ICreatable, ISfcAlterable, IAlterable, ISfcDroppable, 
	IDroppable, ISfcValidate, ISfcDiscoverObject

The Session type exposes the following members.

  NameDescription
Public methodSession()Initializes a new instance of Session class.
Public methodSession(BaseXEStore, String)Initializes a new instance of Session class.
Top

  NameDescription
Protected propertyAbstractIdentityKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public propertyAutoStartGets or sets a value indicating whether the AutoStart object is active or not.
Public propertyEventRetentionModeGets or sets the EventRetentionMode object.
Public propertyEventsGets the EventCollection of the session.
Public propertyIDGets the ID object.
Public propertyIdentityKeyGets the identity key of the session.
Public propertyIsRunningGets a value indicating whether this session is running.
Public propertyMaxDispatchLatencyGets or sets the maximum dispatch latency in seconds.
Public propertyMaxEventSizeGets or sets the size in KB of the maximum event for the session.
Public propertyMaxMemoryGets or sets the maximum memory in KB of the session.
Public propertyMemoryPartitionModeGets or sets the memory partition mode from an enumeration with options for perNode, perCpu, or none.
Public propertyMetadataReturns metadata about the instance and its domain. (Inherited from SfcInstance.)
Public propertyNameGets the name of the Session object.
Public propertyParentGets or sets the parent XEStore object.
Public propertyPropertiesReturns a collection instance properties. (Inherited from SfcInstance.)
Public propertyStartTimeGets the start time.
Public propertyStateGets the state of the object used in Alter function in session.
Public propertyTargetsGets the TargetCollection.
Public propertyTrackCausalityGets or sets a Boolean value indicating whether the TrackCausality object is activated.
Public propertyUrnReturns the uniform resource name of the SfcInstance object. (Inherited from SfcInstance.)
Top

  NameDescription
Public methodAddEvent(String)Adds a new Event object to the session from fully qualified event name.
Public methodAddEvent(EventInfo)Adds a new Event object to the session.
Public methodAddTarget(String)Adds a new Target object to the session.
Public methodAddTarget(TargetInfo)Adds a new Target object to the session.
Public methodAlterAlters the Session object on the server.
Public methodCreateCreates the Session object on the server.
Protected methodCreateIdentityKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodDiscoverDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodDropDrops the Session object on the server.
Public methodEquals (Inherited from Object.)
Protected methodGetChildCollectionDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodGetDomainDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodGetHashCode (Inherited from Object.)
Public methodStatic memberGetObjectFactoryGets the SQL Foundation Class object factory.
Public methodGetPropertySetReturns the set of properties for the SfcInstance object. (Inherited from SfcInstance.)
Public methodGetType (Inherited from Object.)
Protected methodGetTypeMetadataImplIndicates the domains that override by returning the right TypeMetadata class directly. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodInitializeUIPropertyStateDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodOnPropertyMetadataChangesInvoked whenever the effective value of any SfcInstance metadata is updated. (Inherited from SfcInstance.)
Protected methodOnPropertyValueChangesInvoked whenever the effective value of any SfcInstance property is updated. (Inherited from SfcInstance.)
Public methodRefreshRefreshes the object's properties by reading them from the server. (Inherited from SfcInstance.)
Public methodRemoveEventRemoves the specified Event object from the session.
Public methodRemoveTargetRemoves the Target object from the session.
Protected methodResetKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodScriptAlterGets the alteration ISfcScript for the session.
Public methodScriptCreateGets the creation ISfcScript for the session.
Public methodScriptDropGets the drop ISfcScript for the session.
Public methodSerializeSerializes the instance to XML. (Inherited from SfcInstance.)
Public methodStartStarts the Session object.
Public methodStopStops the Session object.
Public methodToStringReturns a string representation of the instance Urn. (Inherited from SfcInstance.)
Public methodValidate(String)Validates the specified method name.
Public methodValidate(String, Object[])Validates the method specified by the name parameter.
Top

  NameDescription
Public eventPropertyChangedCLS-compliant event for property changes. (Inherited from SfcInstance.)
Public eventPropertyMetadataChangedCLS-compliant event for property metadata changes. (Inherited from SfcInstance.)
Top

  NameDescription
Public fieldStatic memberDefaultDispatchLatencyDefault dispatch latency is 30 seconds.
Public fieldStatic memberDefaultMaxMemoryThe maximum amount of memory by default is 4 MB.
Public fieldStatic memberInfiniteDispatchLatency0 indicates that dispatch latency is infinite.
Public fieldStatic memberNotStartedSession is currently not running.
Public fieldStatic memberTypeTypeNameThe name of the type.
Top

  NameDescription
Explicit interface implemetationPrivate methodISfcDiscoverObject.DiscoverDiscovers or alters dependency actions and events in the Session object.
Top

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft