Skip to content

Latest commit

 

History

History
540 lines (434 loc) · 14 KB

New-AzSqlElasticPool.md

File metadata and controls

540 lines (434 loc) · 14 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.PowerShell.Cmdlets.Sql.dll-Help.xml
Az.Sql
009899E5-83BF-4A3F-877E-70C16D5CD1AC
2.0.0

New-AzSqlElasticPool

SYNOPSIS

Creates an elastic database pool for a SQL Database.

SYNTAX

DtuBasedPool (Default)

New-AzSqlElasticPool [-ElasticPoolName] <String> [-Edition <String>] [-Dtu <Int32>] [-StorageMB <Int32>]
 [-DatabaseDtuMin <Int32>] [-DatabaseDtuMax <Int32>] [-Tags <Hashtable>] [-ZoneRedundant]
 [-LicenseType <String>] [-MaintenanceConfigurationId <String>] [-HighAvailabilityReplicaCount <Int32>]
 [-PreferredEnclaveType <String>] [-AsJob] [-ServerName] <String> [-ResourceGroupName] <String>
 [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

VcoreBasedPool

New-AzSqlElasticPool [-ElasticPoolName] <String> -Edition <String> [-StorageMB <Int32>] -VCore <Int32>
 -ComputeGeneration <String> [-DatabaseVCoreMin <Double>] [-DatabaseVCoreMax <Double>] [-Tags <Hashtable>]
 [-ZoneRedundant] [-LicenseType <String>] [-MaintenanceConfigurationId <String>]
 [-HighAvailabilityReplicaCount <Int32>] [-PreferredEnclaveType <String>] [-AsJob] [-ServerName] <String>
 [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The New-AzSqlElasticPool cmdlet creates an elastic database pool for an Azure SQL Database. Several parameters (-Dtu, -DatabaseDtuMin, and -DatabaseDtuMax) require the value being set is from the list of valid values for that parameter. For example, -DatabaseDtuMax for a Standard 100 eDTU pool can only be set to 10, 20, 50, or 100. For details about which values are valid, see the table for your specific size pool in elastic pools.

EXAMPLES

Example 1: Create a DTU elastic pool

New-AzSqlElasticPool -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ElasticPoolName "ElasticPool01" -Edition "Standard" -Dtu 400 -DatabaseDtuMin 10 -DatabaseDtuMax 100
ResourceId        : /subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/resourcegroup01/providers/Microsoft.Sql/servers/server01/elasticPools/elasticpool01
ResourceGroupName : resourcegroup01
ServerName        : server01
ElasticPoolName   : elasticpool01
Location          : Central US
CreationDate      : 8/26/2015 10:00:17 PM
State             : Ready
Edition           : Standard
Dtu               : 400
DatabaseDtuMax    : 100
DatabaseDtuMin    : 10
StorageMB         : 409600
Tags              :

This command creates an elastic pool in the Standard service tier named ElasticPool01. The server named server01, assigned to an Azure resource group named ResourceGroup01, hosts the elastic pool in. The command specifies DTU property values for the pool and the databases in the pool.

Example 2: Create a vCore elastic pool

New-AzSqlElasticPool -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ElasticPoolName "ElasticPool01" -Edition "GeneralPurpose" -vCore 2 -ComputeGeneration Gen5
ResourceId          : /subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/servers/server01/elasticPools/ElasticPool01
ResourceGroupName   : ResourceGroup01
ServerName          : Server01
ElasticPoolName     : ElasticPool01
Location            : Central US
CreationDate        : 8/29/2019 2:16:40 AM
State               : Ready
Edition             : GeneralPurpose
SkuName             : GP_Gen5
Dtu                 : 2
DatabaseDtuMax      : 2
DatabaseDtuMin      : 0
Capacity            : 2
DatabaseCapacityMin : 0
DatabaseCapacityMax : 2
Family              : Gen5
MaxSizeBytes        : 34359738368
StorageMB           : 32768
Tags                :

This command creates an elastic pool in the GengeralPurpose service tier named ElasticPool01. The server named server01, assigned to an Azure resource group named ResourceGroup01, hosts the elastic pool in. The command specifies the vCore property values for the pool and the databases in the pool.

Example 3

Creates an elastic database pool for a SQL Database. (autogenerated)

New-AzSqlElasticPool -ComputeGeneration Gen5 -Edition 'GeneralPurpose' -ElasticPoolName 'ElasticPool01' -ResourceGroupName 'ResourceGroup01' -ServerName 'Server01' -StorageMB 2097152 -VCore 2

Example 4: Creates an elastic pool with preferred enclave type as VBS

New-AzSqlElasticPool -ComputeGeneration Gen5 -Edition 'GeneralPurpose' -ElasticPoolName 'ElasticPool01' -ResourceGroupName 'ResourceGroup01' -ServerName 'Server01' -VCore 2 -PreferredEnclaveType 'VBS'
ResourceId          : /subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/servers/server01/elasticPools/ElasticPool01
ResourceGroupName   : ResourceGroup01
ServerName          : Server01
ElasticPoolName     : ElasticPool01
Location            : Central US
CreationDate        : 8/29/2019 2:16:40 AM
State               : Ready
Edition             : GeneralPurpose
SkuName             : GP_Gen5
Dtu                 : 2
DatabaseDtuMax      : 2
DatabaseDtuMin      : 0
Capacity            : 2
DatabaseCapacityMin : 0
DatabaseCapacityMax : 2
Family              : Gen5
MaxSizeBytes        : 34359738368
StorageMB           : 32768
PreferredEnclaveType: VBS
Tags                :

This command creates an elastic pool configured with VBS enclave

PARAMETERS

-AsJob

Run cmdlet in the background

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputeGeneration

The compute generation to assign.

Type: System.String
Parameter Sets: VcoreBasedPool
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseDtuMax

Specifies the maximum number of Database Throughput Units (DTUs) that any single database in the pool can consume. The default values for the different editions are as follows:

  • Basic. 5 DTUs
  • Standard. 100 DTUs
  • Premium. 125 DTUs For details about which values are valid, see the table for your specific size pool in elastic pools
Type: System.Int32
Parameter Sets: DtuBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseDtuMin

Specifies the minimum number of DTUs that the elastic pool guarantees to all the databases in the pool. The default value is zero (0). For details about which values are valid, see the table for your specific size pool in elastic pools.

Type: System.Int32
Parameter Sets: DtuBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseVCoreMax

The maximum VCore number any SqlAzure Database can consume in the pool.

Type: System.Double
Parameter Sets: VcoreBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseVCoreMin

The minimum VCore number any SqlAzure Database can consume in the pool.

Type: System.Double
Parameter Sets: VcoreBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Dtu

Specifies the total number of shared DTUs for the elastic pool. The default values for the different editions are as follows:

  • Basic. 100 DTUs
  • Standard. 100 DTUs
  • Premium. 125 DTUs For details about which values are valid, see the table for your specific size pool in elastic pools.
Type: System.Int32
Parameter Sets: DtuBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Edition

Specifies the edition of the Azure SQL Database used for the elastic pool. The acceptable values for this parameter are:

  • None
  • Basic
  • Standard
  • Premium
  • DataWarehouse
  • Free
  • Stretch
  • GeneralPurpose
  • BusinessCritical
Type: System.String
Parameter Sets: DtuBasedPool
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: System.String
Parameter Sets: VcoreBasedPool
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ElasticPoolName

Specifies the name of the elastic pool that this cmdlet creates.

Type: System.String
Parameter Sets: (All)
Aliases: Name

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HighAvailabilityReplicaCount

The total number of high availability replicas associated with the elastic pool.

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LicenseType

The license type for the Azure Sql database.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaintenanceConfigurationId

The Maintenance configuration id for the SQL Elastic Pool.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredEnclaveType

The preferred enclave type for the Azure SQL Elastic Pool. Possible values are Default and VBS.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName

Specifies the name of the resource group to which this cmdlet assigns the elastic pool.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServerName

Specifies the name of the server that hosts the elastic pool.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StorageMB

Specifies the storage limit, in megabytes, for the elastic pool. If you do not specify this parameter, this cmdlet calculates a value that depends on the value of the Dtu parameter. See eDTU and storage limits for possible values.

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tags

Specifies a dictionary of Key-value pairs in the form of a hash table that this cmdlet associates with the elastic pool. For example: @{key0="value0";key1=$null;key2="value2"}

Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases: Tag

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VCore

The total shared number of Vcores for the Sql Azure Elastic Pool.

Type: System.Int32
Parameter Sets: VcoreBasedPool
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ZoneRedundant

The zone redundancy to associate with the Azure Sql Elastic Pool

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

Microsoft.Azure.Commands.Sql.ElasticPool.Model.AzureSqlElasticPoolModel

NOTES

RELATED LINKS

Get-AzSqlElasticPool

Get-AzSqlElasticPoolActivity

Get-AzSqlElasticPoolDatabase

Remove-AzSqlElasticPool

Set-AzSqlElasticPool

SQL Database Documentation