Implementing an Azure SQL Database elastic pool using PowerShell
An elastic pool is a cost-effective mechanism to group single Azure SQL databases with varying peak usage times. For example, consider 20 different SQL databases with varying usage patterns, each S3 Standard storage class requiring 100 database throughput units (DTUs) to run. We need to pay for 100 DTUs separately. However, we can group all of them in an elastic pool of S3 Standard storage classes. In this case, we only need to pay for elastic pool pricing and not for each individual SQL database.
In this recipe, we’ll create an elastic pool of multiple single Azure databases.
Getting ready
In a new PowerShell window, execute the Connect-AzAccount
command and follow the steps to log in to your Azure account.
How to do it...
The steps for this recipe are as follows:
- Execute the following query on an Azure SQL Server:
#create credential object for the Azure SQL Server admin credential $sqladminpassword...