az sql elastic-pool

Manage elastic pools.

Commands

az sql elastic-pool create Create an elastic pool.
az sql elastic-pool delete Deletes an elastic pool.
az sql elastic-pool list Gets all elastic pools in a server.
az sql elastic-pool list-dbs Gets a list of databases in an elastic pool.
az sql elastic-pool list-editions List elastic pool editions available for the active subscription.
az sql elastic-pool op Manage operations on an elastic pool.
az sql elastic-pool op cancel Cancels the asynchronous operation on the elastic pool.
az sql elastic-pool op list Gets a list of operations performed on the elastic pool.
az sql elastic-pool show Gets an elastic pool.
az sql elastic-pool update Update an elastic pool.

az sql elastic-pool create

Create an elastic pool.

az sql elastic-pool create --name
--resource-group
--server
[--capacity]
[--db-dtu-max]
[--db-dtu-min]
[--edition]
[--family]
[--license-type {BasePrice, LicenseIncluded}]
[--max-size]
[--no-wait]
[--tags]
[--zone-redundant {false, true}]

Examples

Create elastic pool with zone redundancy enabled

az sql elastic-pool create -g mygroup -s myserver -n mypool -z

Create elastic pool with zone redundancy explicitly disabled

az sql elastic-pool create -g mygroup -s myserver -n mypool -z false

Create a Standard 100 DTU elastic pool.

az sql elastic-pool create -g mygroup -s myserver -n mydb -e Standard -c 100

Create an elastic pool with GeneralPurpose edition, Gen4 hardware and 1 vcore.

az sql elastic-pool create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1

Required Parameters

--name -n

The name of the elastic pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

Optional Parameters

--capacity --dtu -c

The capacity component of the sku in integer number of DTUs or vcores.

--db-dtu-max --db-max-capacity --db-max-dtu

The maximum capacity (in DTUs or vcores) any one database can consume.

--db-dtu-min --db-min-capacity --db-min-dtu

The minumum capacity (in DTUs or vcores) each database is guaranteed.

--edition --tier -e

The edition component of the sku. Allowed values include: Basic, Standard, Premium, GeneralPurpose, BusinessCritical.

--family -f

The compute generation component of the sku (for vcore skus only). Allowed values include: Gen4, Gen5.

--license-type

The license type to apply for this elastic pool.

accepted values: BasePrice, LicenseIncluded
--max-size --storage

The max storage size. If no unit is specified, defaults to bytes (B).

--no-wait

Do not wait for the long-running operation to finish.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--zone-redundant -z

Specifies whether to enable zone redundancy.

accepted values: false, true

az sql elastic-pool delete

Deletes an elastic pool.

az sql elastic-pool delete --name
--resource-group
--server
[--no-wait]

Required Parameters

--name -n

The name of the elastic pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

az sql elastic-pool list

Gets all elastic pools in a server.

az sql elastic-pool list --resource-group
--server
[--skip]

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

Optional Parameters

--skip

The number of elements in the collection to skip.

az sql elastic-pool list-dbs

Gets a list of databases in an elastic pool.

az sql elastic-pool list-dbs --name
--resource-group
--server

Required Parameters

--name -n

The name of the elastic pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

az sql elastic-pool list-editions

List elastic pool editions available for the active subscription.

Also includes available pool DTU settings, storage limits, and per database settings. In order to reduce verbosity, additional storage limits and per database settings are hidden by default.

az sql elastic-pool list-editions --location
[--available]
[--dtu]
[--edition]
[--show-details {db-max-dtu, db-max-size, db-min-dtu, max-size}]
[--vcores]

Examples

Show all elastic pool editions and pool DTU limits in the West US region.

az sql elastic-pool list-editions -l westus

Show all pool DTU limits for Standard edition in the West US region.

az sql elastic-pool list-editions -l westus --edition Standard

Show available max sizes for elastic pools with at least 100 DTUs in the West US region.

az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size

Show available per database settings for Standard 100 DTU elastic pools in the West US region.

az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 --show-details db-min-dtu db-max-dtu db-max-size

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=<location>.

Optional Parameters

--available -a

If specified, show only results that are available in the specified region.

--dtu

Number of DTUs to search for. If unspecified, all DTU sizes are shown.

--edition --tier -e

Edition to search for. If unspecified, all editions are shown.

--show-details -d

List of additional details to include in output.

accepted values: db-max-dtu, db-max-size, db-min-dtu, max-size
--vcores

Number of vcores to search for. If unspecified, all vcore sizes are shown.

az sql elastic-pool show

Gets an elastic pool.

az sql elastic-pool show --name
--resource-group
--server

Required Parameters

--name -n

The name of the elastic pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

az sql elastic-pool update

Update an elastic pool.

az sql elastic-pool update --name
--resource-group
--server
[--add]
[--capacity]
[--db-dtu-max]
[--db-dtu-min]
[--edition]
[--family]
[--max-size]
[--no-wait]
[--remove]
[--set]
[--zone-redundant {false, true}]

Examples

Update elastic pool with zone redundancy enabled

az sql elastic-pool update -g mygroup -s myserver -n mypool -z

Update elastic pool with zone redundancy explicitly disabled

az sql elastic-pool update -g mygroup -s myserver -n mypool -z false

Required Parameters

--name -n

The name of the elastic pool.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server -s

Name of the Azure SQL server.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--capacity --dtu -c

The capacity component of the sku in integer number of DTUs or vcores.

--db-dtu-max --db-max-capacity --db-max-dtu

The maximum capacity (in DTUs or vcores) any one database can consume.

--db-dtu-min --db-min-capacity --db-min-dtu

The minumum capacity (in DTUs or vcores) each database is guaranteed.

--edition --tier -e

The edition component of the sku. Allowed values include: Basic, Standard, Premium, GeneralPurpose, BusinessCritical.

--family -f

The compute generation component of the sku (for vcore skus only). Allowed values include: Gen4, Gen5.

--max-size --storage

The max storage size. If no unit is specified, defaults to bytes (B).

--no-wait

Do not wait for the long-running operation to finish.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--zone-redundant -z

Specifies whether to enable zone redundancy.

accepted values: false, true