Skip to content

Update Set-AzureRmSqlDatabase and Set AzureRmSqlElasticPool description and example #5346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Set-AzureRmSqlDatabase [-DatabaseName] <String> -NewName <String> [-AsJob] [-Ser
```

## DESCRIPTION
The **Set-AzureRmSqlDatabase** cmdlet sets properties for an Azure SQL database.
In addition, you can specify the *ElasticPoolName* parameter to move a database into an elastic pool.
If a database is already in an elastic pool, you can use the *RequestedServiceObjectiveName* parameter to assign a performance level.
The **Set-AzureRmSqlDatabase** cmdlet sets properties for a database in Azure SQL Database. This cmdlet can modify the service tier (*Edition*), performance level (*RequestedServiceObjectiveName*), and storage max size (*MaxSizeBytes*) for the database. In addition, you can specify the *ElasticPoolName* parameter to move a database into an elastic pool. If a database is already in an elastic pool, you can use the *RequestedServiceObjectiveName* parameter to move the database out of an elastic pool and into a performance level for single databases.

## EXAMPLES

Expand Down Expand Up @@ -85,6 +83,31 @@ Tags :

This command adds a database named Database01 to the elastic pool named ElasticPool01 hosted on the server named Server01.

### Example 3: Modify the storage max size of a database
```
PS C:\>Set-AzureRmSqlDatabase -ResourceGroupName "ResourceGroup01" -DatabaseName "Database01" -ServerName "Server01" -MaxSizeBytes 1099511627776
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
Location : Central US
DatabaseId : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition : Standard
CollationName : SQL_Latin1_General_CP1_CI_AS
CatalogCollation :
MaxSizeBytes : 1099511627776
Status : Online
CreationDate : 8/24/2017 9:00:37 AM
CurrentServiceObjectiveId : 789681b8-ca10-4eb0-bdf2-e0b050601b40
CurrentServiceObjectiveName : S3
RequestedServiceObjectiveId : 789681b8-ca10-4eb0-bdf2-e0b050601b40
RequestedServiceObjectiveName :
ElasticPoolName :
EarliestRestoreDate :
Tags :
```

This command updates a database named Database01 to set its max size to 1 TB.

## PARAMETERS

### -AsJob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Set-AzureRmSqlElasticPool [-ElasticPoolName] <String> [-Edition <DatabaseEdition
```

## DESCRIPTION
The **Set-AzureRmSqlElasticPool** cmdlet modifies properties for an elastic database pool in an Azure SQL Database. This cmdlet can modify the minimum Database Throughput Units (DTUs) per database in addition to the maximum DTUs per database, the number of DTUs for the pool, and the storage limit for the pool.
The **Set-AzureRmSqlElasticPool** cmdlet sets properties for an elastic pool in Azure SQL Database. This cmdlet can modify the eDTUs per pool (*Dtu*), storage max size per pool (*StorageMB*), maximum eDTUs per database (*DatabaseDtuMax*), and minimum eDTUs per database (*DatqabaseDtuMin*).

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](https://docs.microsoft.com/azure/sql-database/sql-database-elastic-pool).

Expand All @@ -48,7 +48,7 @@ Tags :
This command modifies properties for an elastic pool named elasticpool01. The command sets the
number of DTUs for the elastic pool to 1000 and sets the minimum and maximum DTUs.

### Example 2: Modify the max storage of an elastic pool
### Example 2: Modify the storage max size of an elastic pool
```
PS C:\>Set-AzureRmSqlDatabaseElasticPool -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ElasticPoolName "ElasticPool01" -StorageMB 2097152
ResourceId : /subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/resourcegroup01/providers/Microsoft.Sql/servers/Server01/elasticPools/ElasticPool01
Expand Down