commands

^

New-DbaRgResourcePool

Author John McCall (@lowlydba), lowlydba.com
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out New-DbaRgResourcePool on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbaRgResourcePool.

Synopsis

Creates a resource pool for use by the Resource Governor on the specified SQL Server.

Description

Creates a resource pool for use by the Resource Governor on the specified SQL Server.
A resource pool represents a subset of the physical resources (memory, CPUs and IO) of an instance of the Database Engine.

Syntax

New-DbaRgResourcePool -SqlInstance <DbaInstanceParameter[]>
    [-SqlCredential <PSCredential>]
    [-ResourcePool <String[]>]
    [-Type <String>]
    [-MaximumCpuPercentage <Int32>]
    [-MaximumMemoryPercentage <Int32>]
    [-SkipReconfigure]
    [-Force]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

New-DbaRgResourcePool -SqlInstance <DbaInstanceParameter[]>
    [-SqlCredential <PSCredential>]
    [-ResourcePool <String[]>]
    [-Type <String>]
    [-MinimumCpuPercentage <Int32>]
    [-MaximumCpuPercentage <Int32>]
    [-CapCpuPercentage <Int32>]
    [-MinimumMemoryPercentage <Int32>]
    [-MaximumMemoryPercentage <Int32>]
    [-MinimumIOPSPerVolume <Int32>]
    [-MaximumIOPSPerVolume <Int32>]
    [-SkipReconfigure]
    [-Force]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

New-DbaRgResourcePool -SqlInstance <DbaInstanceParameter[]>
    [-SqlCredential <PSCredential>]
    [-ResourcePool <String[]>]
    [-Type <String>]
    [-MaximumCpuPercentage <Int32>]
    [-MaximumMemoryPercentage <Int32>]
    [-MaximumProcesses <Int32>]
    [-SkipReconfigure]
    [-Force]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> New-DbaRgResourcePool -SqlInstance sql2016 -ResourcePool "poolAdmin"

Creates a new resource pool named "poolAdmin" for the instance sql2016.

Example: 2
PS C:\> New-DbaRgResourcePool -SqlInstance sql2012\dev1 -ResourcePool "poolDeveloper" -SkipReconfigure

Creates a new resource pool named "poolDeveloper" for the instance dev1 on sq2012.
Reconfiguration is skipped and the Resource Governor will not be able to use the new resource pool
until it is reconfigured.

Required Parameters

-SqlInstance

The target SQL Server instance or instances.

Alias
Required True
Pipeline true (ByValue, ByPropertyName)
Default Value

Optional Parameters

-SqlCredential

Credential object used to connect to the Windows server as a different user

Alias
Required False
Pipeline false
Default Value
-ResourcePool

Name of the resource pool to be created.

Alias
Required False
Pipeline false
Default Value
-Type

Internal or External.

Alias
Required False
Pipeline false
Default Value Internal
Accepted Values Internal,External
-MinimumCpuPercentage

Specifies the guaranteed average CPU bandwidth for all requests in the resource pool when there is CPU contention.

Alias
Required False
Pipeline false
Default Value 0
-MaximumCpuPercentage

Specifies the maximum average CPU bandwidth that all requests in resource pool will receive when there is CPU contention.

Alias
Required False
Pipeline false
Default Value 100
-CapCpuPercentage

Specifies a hard cap on the CPU bandwidth that all requests in the resource pool will receive.
Limits the maximum CPU bandwidth level to be the same as the specified value. Only for SQL Server 2012+

Alias
Required False
Pipeline false
Default Value 100
-MinimumMemoryPercentage

Specifies the minimum amount of memory reserved for this resource pool that can not be shared with other resource pools.

Alias
Required False
Pipeline false
Default Value 0
-MaximumMemoryPercentage

Specifies the total server memory that can be used by requests in this resource pool. value is an integer with a default setting of 100.

Alias
Required False
Pipeline false
Default Value 100
-MinimumIOPSPerVolume

Specifies the minimum I/O operations per second (IOPS) per disk volume to reserve for the resource pool.

Alias
Required False
Pipeline false
Default Value 0
-MaximumIOPSPerVolume

Specifies the maximum I/O operations per second (IOPS) per disk volume to allow for the resource pool.

Alias
Required False
Pipeline false
Default Value 0
-MaximumProcesses

Specifies the maximum number of processes allowed for the external resource pool.
Specify 0 to set an unlimited threshold for the pool, which is thereafter bound only by computer resources.

Alias
Required False
Pipeline false
Default Value 0
-SkipReconfigure

Resource Governor requires a reconfiguriation for resource pool changes to take effect.
Use this switch to skip issuing a reconfigure for the Resource Governor.

Alias
Required False
Pipeline false
Default Value False
-Force

If the resource pool already exists, drop and re-create it.

Alias
Required False
Pipeline false
Default Value False
-EnableException

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
-WhatIf

Shows what would happen if the command were to run. No actions are actually performed.

Alias wi
Required False
Pipeline false
Default Value
-Confirm

Prompts you for confirmation before executing any changing operations within the command.

Alias cf
Required False
Pipeline false
Default Value