Author | John McCall (@lowlydba), lowlydba.com |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out New-DbaRgWorkloadGroup on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbaRgWorkloadGroup.
Creates a Resource Governor workload group and associates the workload group with a Resource Governor resource pool.
Creates a Resource Governor workload group and associates the workload group with a Resource Governor resource pool.
A workload group represents a subset of the resources of a resource pool in instance of the Database Engine.
New-DbaRgWorkloadGroup
[[-SqlInstance] <DbaInstanceParameter[]>]
[[-SqlCredential] <PSCredential>]
[[-WorkloadGroup] <String[]>]
[[-ResourcePool] <String>]
[[-ResourcePoolType] <String>]
[[-Importance] <String>]
[[-RequestMaximumMemoryGrantPercentage] <Int32>]
[[-RequestMaximumCpuTimeInSeconds] <Int32>]
[[-RequestMemoryGrantTimeoutInSeconds] <Int32>]
[[-MaximumDegreeOfParallelism] <Int32>]
[[-GroupMaximumRequests] <Int32>]
[-SkipReconfigure]
[-Force]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> New-DbaRgWorkloadGroup -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -ResourcePool "poolAdmin"
Creates a workload group "groupAdmin" in the resource pool named "poolAdmin" for the instance sql2016.
PS C:\> New-DbaRgWorkloadGroup -SqlInstance sql2016 -WorkloadGroup "groupAdmin" -Force
If "groupAdmin" exists, it is dropped and re-created in the default resource pool for the instance sql2016.
The target SQL Server instance or instances.
Alias | |
Required | False |
Pipeline | true (ByValue, ByPropertyName) |
Default Value |
Credential object used to connect to the Windows server as a different user
Alias | |
Required | False |
Pipeline | true (ByPropertyName) |
Default Value |
Name of the workload group to be created.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Name of the resource pool to create the workload group in. If not provided, set to the Default Resource Pool.
Alias | |
Required | False |
Pipeline | false |
Default Value | default |
Internal (default) or External
Alias | |
Required | False |
Pipeline | false |
Default Value | Internal |
Accepted Values | Internal,External |
Specifies the relative importance of a request in the workload group. Default is MEDIUM, allowed: LOW, MEDIUM, HIGH
Alias | |
Required | False |
Pipeline | false |
Default Value | MEDIUM |
Accepted Values | LOW,MEDIUM,HIGH |
Specifies the maximum amount of memory that a single request can take from the pool. Default is 25%.
Alias | |
Required | False |
Pipeline | false |
Default Value | 25 |
Specifies the maximum amount of CPU time, in seconds, that a request can use.
Alias | |
Required | False |
Pipeline | false |
Default Value | 0 |
Specifies the maximum time, in seconds, that a query can wait for a memory grant (work buffer memory) to become available.
Alias | |
Required | False |
Pipeline | false |
Default Value | 0 |
Specifies the maximum degree of parallelism (MAXDOP) for parallel query execution.
Alias | |
Required | False |
Pipeline | false |
Default Value | 0 |
Specifies the maximum number of simultaneous requests that are allowed to execute in the workload group.
Alias | |
Required | False |
Pipeline | false |
Default Value | 0 |
Resource Governor requires a reconfiguriation for workload group changes to take effect.
Use this switch to skip issuing a reconfigure for the Resource Governor.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
If the workload group already exists, drop and re-create it.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
Shows what would happen if the command were to run. No actions are actually performed.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
Prompts you for confirmation before executing any changing operations within the command.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |