Класс 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.
Безопасность многопоточности
Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.