Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.29 KB

File metadata and controls

64 lines (43 loc) · 2.29 KB
title The Azure CLI: Scale an elastic pool
description Use an Azure CLI example script to scale an elastic pool in Azure SQL Database.
services sql-database
ms.service sql-database
ms.subservice elastic-pools
ms.custom sqldbrb=1, devx-track-azurecli
ms.devlang azurecli
ms.topic sample
author arvindshmicrosoft
ms.author arvindsh
ms.reviewer kendralittle, mathoma
ms.date 12/07/2021

Use the Azure CLI to scale an elastic pool in Azure SQL Database

[!INCLUDEappliesto-sqldb]

This Azure CLI script example creates elastic pools in Azure SQL Database, moves pooled databases, and changes elastic pool compute sizes.

If you choose to install and use the Azure CLI locally, this topic requires that you are running the Azure CLI version 2.0 or later. Run az --version to find the version. If you need to install or upgrade, see Install the Azure CLI.

Sample script

Sign in to Azure

Sign in to Azure using the appropriate subscription. [!INCLUDE quickstarts-free-trial-note]

subscription="<subscriptionId>" # add subscription here

az account set -s $subscription # ...or use 'az login'

For more information, see set active subscription or log in interactively

Run the script

:::code language="azurecli" source="~/azure_cli_scripts/sql-database/scale-pool/scale-pool.sh" range="4-35":::

Clean up deployment

Use the following command to remove the resource group and all resources associated with it.

az group delete --name $resourceGroup

Sample reference

This script uses the following commands. Each command in the table links to command-specific documentation.

Command Description
az sql server Server commands.
az sql db Database commands.
az sql elastic-pools Elastic pool commands.

Next steps

For more information on the Azure CLI, see Azure CLI documentation.

Additional SQL Database CLI script samples can be found in the Azure SQL Database documentation.