Session Class
Represents a row in sys.server_event_sessions and includes data from sys.dm_xe_sessions if running.
Assembly: Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)
Microsoft.SqlServer.Management.Sdk.Sfc::SfcInstance
Microsoft.SqlServer.Management.XEvent::Session
| Name | Description | |
|---|---|---|
![]() | Session() | Initializes a new instance of Session class. |
![]() | Session(BaseXEStore^, String^) | Initializes a new instance of Session class. |
| Name | Description | |
|---|---|---|
![]() | AbstractIdentityKey | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from 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.(Inherited from SfcInstance.) |
![]() | Name | Gets the name of the Session object. |
![]() | Parent | Gets or sets the parent XEStore object. |
![]() | Properties | Returns a collection instance properties.(Inherited from 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.(Inherited from SfcInstance.) |
| Name | Description | |
|---|---|---|
![]() | AddEvent(EventInfo^) | Adds a new Event object to the session. |
![]() | AddEvent(String^) | Adds a new Event object to the session from fully qualified event name. |
![]() | 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() | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SfcInstance.) |
![]() | Discover(ISfcDependencyDiscoveryObjectSink^) | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SfcInstance.) |
![]() | Drop() | Drops the Session object on the server. |
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | GetChildCollection(String^) | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SfcInstance.) |
![]() | GetDomain() | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SfcInstance.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() ![]() | GetObjectFactory() | Gets the SQL Foundation Class object factory. |
![]() | GetPropertySet() | Returns the set of properties for the SfcInstance object.(Inherited from SfcInstance.) |
![]() | GetType() | (Inherited from Object.) |
![]() | GetTypeMetadataImpl() | Indicates 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.) |
![]() | InitializeUIPropertyState() | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SfcInstance.) |
![]() | OnPropertyMetadataChanges(SfcPropertyMetadataChangedEventArgs^) | Invoked whenever the effective value of any SfcInstance metadata is updated. (Inherited from SfcInstance.) |
![]() | OnPropertyValueChanges(PropertyChangedEventArgs^) | Invoked whenever the effective value of any SfcInstance property is updated. (Inherited from SfcInstance.) |
![]() | Refresh() | Refreshes the object's properties by reading them from the server.(Inherited from SfcInstance.) |
![]() | RemoveEvent(Event^) | Removes the specified Event object from the session. |
![]() | RemoveTarget(Target^) | Removes the Target object from the session. |
![]() | ResetKey() | Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from 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(XmlWriter^) | Serializes the instance to XML.(Inherited from SfcInstance.) |
![]() | Start() | Starts the Session object. |
![]() | Stop() | Stops the Session object. |
![]() | ToString() | Returns a string representation of the instance Urn.(Inherited from SfcInstance.) |
![]() | Validate(String^) | Validates the specified method name. |
![]() | Validate(String^, array<Object^>^) | Validates the method specified by the name parameter. |
| Name | Description | |
|---|---|---|
![]() ![]() | AutoStartProperty | Specifies the auto start property session. |
![]() ![]() | DefaultDispatchLatency | Default dispatch latency is 30 seconds. |
![]() ![]() | DefaultMaxMemory | The maximum amount of memory by default is 4 MB. |
![]() ![]() | EventRetentionModeProperty | Specifies the property of the event retention mode. |
![]() ![]() | InfiniteDispatchLatency | 0 indicates that dispatch latency is infinite. |
![]() ![]() | MaxDispatchLatencyProperty | Specifies the maximum dispatch latency property. |
![]() ![]() | MaxEventSizeProperty | Shows the maximum event size of the property. |
![]() ![]() | MaxMemoryProperty | Specifies the maximum memory property. |
![]() ![]() | MemoryPartitionModeProperty | Specifies a memory partition mode property. |
![]() ![]() | NotStarted | Session is currently not running. |
![]() ![]() | TrackCausalityProperty | The track casualty property of the session. |
![]() ![]() | TypeTypeName | The name of the type. |
| Name | Description | |
|---|---|---|
![]() | PropertyChanged | Occurs when a property value changes.(Inherited from SfcInstance.) |
![]() | PropertyMetadataChanged | Occurs when the metadata for a property has changed.(Inherited from SfcInstance.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ISfcDiscoverObject::Discover(ISfcDependencyDiscoveryObjectSink^) | Discovers or alters dependency actions and events in the Session object. |
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.








