Bearbeiten

Freigeben über


New-AzSqlElasticPool

Creates an elastic database pool for a SQL Database.

Syntax

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>]
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:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputeGeneration

The compute generation to assign.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
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:Int32
Position:Named
Default value:None
Required:False
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:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseVCoreMax

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

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

-DatabaseVCoreMin

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

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
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:Int32
Position:Named
Default value:None
Required:False
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:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ElasticPoolName

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

Type:String
Aliases:Name
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HighAvailabilityReplicaCount

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

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

-LicenseType

The license type for the Azure Sql database.

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

-MaintenanceConfigurationId

The Maintenance configuration id for the SQL Elastic Pool.

Type:String
Position:Named
Default value:None
Required:False
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:String
Position:Named
Default value:None
Required:False
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:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerName

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

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
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:Int32
Position:Named
Default value:None
Required:False
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:Hashtable
Aliases:Tag
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VCore

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

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

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ZoneRedundant

The zone redundancy to associate with the Azure Sql Elastic Pool

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

Inputs

String

Outputs

AzureSqlElasticPoolModel