lowlydba.sqlserver.rg_workload_group (2.3.2) — module

Configures a workload group for use by the Resource Governor

| "added in version" 0.1.0 of lowlydba.sqlserver"

Authors: John McCall (@lowlydba)

Install collection

Install with ansible-galaxy collection install lowlydba.sqlserver:==2.3.2


Add to requirements.yml

  collections:
    - name: lowlydba.sqlserver
      version: 2.3.2

Description

Creates or modifies a workload group to be used by the Resource Governor. Default values are handled by the Powershell functions themselves.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable resource governor
  lowlydba.sqlserver.resource_governor:
    sql_instance: sql-01.myco.io
    enabled: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create rg resource pool
  lowlydba.sqlserver.rg_resource_pool:
    sql_instance: sql-01.myco.io
    resource_pool: "rpLittle"
    max_cpu_perc: 5
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create rg workload group
  lowlydba.sqlserver.rg_workload_group:
    sql_instance: sql-01.myco.io
    workload_group: rgMyGroup
    resource_pool: rpLittle
    resource_pool_type: Internal
    max_dop: 2
    state: present

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether or not the object should be C(present) or C(absent).
    required: false
    type: str

max_dop:
    description:
    - Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.
    required: false
    type: int

importance:
    choices:
    - Low
    - Medium
    - High
    description:
    - Specifies the relative importance of a request in the workload group.
    required: false
    type: str

sql_instance:
    description:
    - The SQL Server instance to modify.
    required: true
    type: str

sql_password:
    description:
    - Password for SQL Authentication.
    required: false
    type: str

sql_username:
    description:
    - Username for SQL Authentication.
    required: false
    type: str

resource_pool:
    description:
    - Name of the resource pool for the workload group.
    required: true
    type: str

workload_group:
    description:
    - Name of the target workload group.
    required: true
    type: str

group_max_requests:
    description:
    - Specifies the maximum number of simultaneous requests that are allowed to execute
      in the workload group.
    required: false
    type: int

resource_pool_type:
    choices:
    - Internal
    - External
    default: Internal
    description:
    - Specify the type of resource pool.
    required: false
    type: str

request_max_cpu_time:
    description:
    - Specifies the maximum amount of CPU time, in seconds, that a request can use.
    required: false
    type: int

request_max_mem_grant_perc:
    description:
    - Specifies the maximum amount of memory that a single request can take from the pool.
    required: false
    type: int

request_mem_grant_timeout_sec:
    description:
    - Specifies the maximum time, in seconds, that a query can wait for a memory grant
      (work buffer memory) to become available.
    required: false
    type: int

Outputs

data:
  description: Output from the C(Set-DbaRgWorkloadGroup), C(New-DbaRgWorkloadGroup),
    or C(Remove-DbaRgWorkloadGroup) function.
  returned: success, but not in check_mode.
  type: dict