commands

^

Remove-DbaRgResourcePool

Author John McCall (@lowlydba), https://www.lowlydba.com/
Availability Windows, Linux, macOS

 

Synopsis

Removes a resource pool from the Resource Governor on the specified SQL Server.

Description

Removes a resource pool from 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

Remove-DbaRgResourcePool
    [[-SqlInstance] <DbaInstanceParameter[]>]
    [[-SqlCredential] <PSCredential>]
    [[-ResourcePool] <String[]>]
    [[-Type] <String>]
    [-SkipReconfigure]
    [[-InputObject] <Object[]>]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Remove-DbaRgResourcePool -SqlInstance sql2016 -ResourcePool "poolAdmin" -Type Internal

Removes an internal resource pool named "poolAdmin" for the instance sql2016.

Example: 2
PS C:\> Get-DbaRgResourcePool -SqlInstance sql2016 -Type "Internal" | Where-Object { $_.IsSystemObject -eq $false } | Remove-DbaRgResourcePool

Removes all user internal resource pools for the instance sql2016 by piping output from Get-DbaRgResourcePool.

Optional Parameters

-SqlInstance

The target SQL Server instance or instances.

Alias
Required False
Pipeline true (ByValue, ByPropertyName)
Default Value
-SqlCredential

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

Alias
Required False
Pipeline true (ByPropertyName)
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
-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
-InputObject

Allows input to be piped from Get-DbaRgResourcePool.

Alias
Required False
Pipeline true (ByValue)
Default Value
-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

 

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