Поделиться через


Класс WorkloadGroup

The WorkloadGroup class is represents a SQL Server workgroup, which contains a group of session requests. Workload groups allow aggregate monitoring of resource consumption and application of uniform policies to all requests in the group.

Иерархия наследования

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase
          Microsoft.SqlServer.Management.Smo.WorkloadGroup

Пространство имен:  Microsoft.SqlServer.Management.Smo
Сборка:  Microsoft.SqlServer.Smo (в Microsoft.SqlServer.Smo.dll)

Синтаксис

'Декларация
<StateChangeEventAttribute("CREATE_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")> _
<StateChangeEventAttribute("ALTER_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None Or AutomatedPolicyEvaluationMode.Enforce Or AutomatedPolicyEvaluationMode.CheckOnChanges Or AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute> _
Public NotInheritable Class WorkloadGroup _
    Inherits ScriptNameObjectBase _
    Implements ISfcSupportsDesignMode, ICreatable, IDroppable, IAlterable,  _
    IScriptable
'Применение
Dim instance As WorkloadGroup
[StateChangeEventAttribute("CREATE_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")]
[StateChangeEventAttribute("ALTER_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute]
public sealed class WorkloadGroup : ScriptNameObjectBase, 
    ISfcSupportsDesignMode, ICreatable, IDroppable, IAlterable, IScriptable
[StateChangeEventAttribute(L"CREATE_WORKLOAD_GROUP", L"WORKLOADGROUP", L"WORKLOAD GROUP")]
[StateChangeEventAttribute(L"ALTER_WORKLOAD_GROUP", L"WORKLOADGROUP", L"WORKLOAD GROUP")]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::None|AutomatedPolicyEvaluationMode::Enforce|AutomatedPolicyEvaluationMode::CheckOnChanges|AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute]
public ref class WorkloadGroup sealed : public ScriptNameObjectBase, 
    ISfcSupportsDesignMode, ICreatable, IDroppable, IAlterable, IScriptable
[<SealedAttribute>]
[<StateChangeEventAttribute("CREATE_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")>]
[<StateChangeEventAttribute("ALTER_WORKLOAD_GROUP", "WORKLOADGROUP", "WORKLOAD GROUP")>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.None|AutomatedPolicyEvaluationMode.Enforce|AutomatedPolicyEvaluationMode.CheckOnChanges|AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute>]
type WorkloadGroup =  
    class 
        inherit ScriptNameObjectBase 
        interface ISfcSupportsDesignMode 
        interface ICreatable 
        interface IDroppable 
        interface IAlterable 
        interface IScriptable 
    end
public final class WorkloadGroup extends ScriptNameObjectBase implements ISfcSupportsDesignMode, ICreatable, IDroppable, IAlterable, IScriptable

Тип WorkloadGroup обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод WorkloadGroup() Initializes a new, default instance of the WorkloadGroup class.
Открытый метод WorkloadGroup(ResourcePool, String) Initializes a new instance of the WorkloadGroup class that has the specified name and resource pool.

В начало

Свойства

  Имя Описание
Открытое свойство GroupMaximumRequests Gets or sets the maximum number of requests that can be stored in the workload group.
Открытое свойство ID Gets the ID of the workload group.
Открытое свойство Importance Gets or sets a value that indicates the level of importance that the workload group has.
Открытое свойство IsSystemObject Gets a Boolean value that indicates whether the workload group is a system object.
Открытое свойство MaximumDegreeOfParallelism Gets or sets the maximum degree of parallelism for the workload group.
Открытое свойство Name Gets or sets a String which contains the name of the WorkloadGroup. (Переопределяет NamedSmoObject.Name.)
Открытое свойство Parent Gets or sets the ResourcePool object that is the parent of the WorkloadGroup.
Открытое свойство Properties Gets a collection of Property objects that represent the object properties. (Производный от SqlSmoObject.)
Открытое свойство RequestMaximumCpuTimeInSeconds Gets or sets the request maximum CPU time in seconds
Открытое свойство RequestMaximumMemoryGrantPercentage Gets or sets the request maximum memory grant percentage in seconds.
Открытое свойство RequestMemoryGrantTimeoutInSeconds Gets or sets the request memory grant time-out in seconds.
Открытое свойство State Gets the state of the referenced object. (Производный от SmoObjectBase.)
Открытое свойство Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Производный от SqlSmoObject.)
Открытое свойство UserData Gets or sets user-defined data associated with the referenced object. (Производный от SmoObjectBase.)

В начало

Методы

  Имя Описание
Открытый метод Alter Updates any WorkloadGroup object property changes on the instance of SQL Server. 
Открытый метод Create Creates a workload group on the instance of SQL Server as defined by the WorkloadGroup object.
Открытый метод Discover Discovers a list of type Object. (Производный от SqlSmoObject.)
Открытый метод Drop Drops the workload group.
Открытый метод Equals (Производный от Object.)
Защищенный метод FormatSqlVariant Formats an object as SqlVariant type. (Производный от SqlSmoObject.)
Защищенный метод GetContextDB Gets the context database that is associated with this object. (Производный от SqlSmoObject.)
Защищенный метод GetDBName Gets the database name that is associated with the object. (Производный от SqlSmoObject.)
Открытый метод GetHashCode (Производный от Object.)
Защищенный метод GetPropValue Gets a property value of the SqlSmoObject object. (Производный от SqlSmoObject.)
Защищенный метод GetPropValueOptional Gets a property value of the SqlSmoObject object. (Производный от SqlSmoObject.)
Защищенный метод GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object. (Производный от SqlSmoObject.)
Защищенный метод GetServerObject Gets the server of the SqlSmoObject object. (Производный от SqlSmoObject.)
Открытый метод GetType (Производный от Object.)
Открытый метод Initialize() Initializes the object and forces the properties be loaded. (Производный от SqlSmoObject.)
Открытый метод Initialize(Boolean) Initializes the object and forces the properties be loaded. (Производный от SqlSmoObject.)
Защищенный метод IsObjectInitialized Verifies whether the object has been initialized. (Производный от SqlSmoObject.)
Защищенный метод IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (Производный от SqlSmoObject.)
Открытый метод MoveToPool Moves the workload group to the specified resource pool.
Открытый метод Refresh Refreshes the script name. (Производный от ScriptNameObjectBase.)
Открытый метод Script() Generates a Transact-SQL script that can be used to re-create the workload group.
Открытый метод Script(ScriptingOptions) Generates a Transact-SQL script that can be used to re-create the workload group as specified by the script options.
Открытый метод ScriptMoveToPool Generates a script to move the workload group to the specified resource pool.
Защищенный метод SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter. (Производный от SqlSmoObject.)
Открытый метод ToString Returns a String that represents the referenced object. (Производный от SqlSmoObject.)
Открытый метод Validate Validates the state of an object. (Производный от SmoObjectBase.)

В начало

События

  Имя Описание
Открытое событие PropertyChanged Represents the event that occurs when a property is changed. (Производный от SqlSmoObject.)
Открытое событие PropertyMetadataChanged Represents the event that occurs when property metadata changes. (Производный от SqlSmoObject.)

В начало

Явные реализации интерфейса

  Имя Описание
Явная реализация интерфейсаЗакрытый метод IAlienObject.Discover Discovers any dependencies. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.GetDomainRoot Returns the root of the domain. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.GetParent Gets the parent of this object. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.GetPropertyType Gets the type of the specified property. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.GetPropertyValue Gets the value of the specified property. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.GetUrn Gets the Unified Resource Name (URN) of the object. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод IAlienObject.SetPropertyValue Sets the property value. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытый метод ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. (Производный от SqlSmoObject.)
Явная реализация интерфейсаЗакрытое свойство ISfcSupportsDesignMode.IsDesignMode Gets a Boolean value that specifies whether the WorkloadGroup object supports design mode.

В начало

Замечания

For more information on workload groups, see Основные понятия регулятора ресурсов.

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.

См. также

Справочник

Пространство имен Microsoft.SqlServer.Management.Smo

Другие ресурсы

Основные понятия регулятора ресурсов