Start-​Azure​Rm​Sql​Server​Upgrade

Starts the upgrade of a SQL Database server.

Syntax

Start-AzureRmSqlServerUpgrade
     [-ResourceGroupName] <String>
     [-DatabaseCollection <RecommendedDatabaseProperties[]>]
     [-ElasticPoolCollection <UpgradeRecommendedElasticPoolProperties[]>]
     [-ScheduleUpgradeAfterUtcDateTime <DateTime>]
     -ServerName <String>
     -ServerVersion <String>
     [<CommonParameters>]

Description

The Start-AzureRmSqlServerUpgrade cmdlet starts the upgrade of an Azure SQL Database server version 11 to version 12. You can monitor the progress of an upgrade by using the Get-AzureRmSqlServerUpgrade cmdlet.

Examples

Example 1: Upgrade a server

PS C:\>Start-AzureRmSqlServerUpgrade -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ServerVersion 12.0
ResourceGroupName               : ResourceGroup01
ServerName                      : Server01
ServerVersion                   : 12.0
ScheduleUpgradeAfterUtcDateTime : 
DatabaseCollection              :

This command upgrades the server named server01 assigned to resource group TesourceGroup01.

Example 2: Upgrade a server by using schedule time and database recommendation

PS C:\>$ScheduleTime = (Get-Date).AddMinutes(5).ToUniversalTime()
PS C:\> $DatabaseMap = New-Object -TypeName Microsoft.Azure.Management.Sql.Models.RecommendedDatabaseProperties
PS C:\> $DatabaseMap.Name = "contosodb"
PS C:\> $DatabaseMap.TargetEdition = "Standard"
PS C:\> $DatabaseMap.TargetServiceLevelObjective = "S0"
PS C:\> Start-AzureRmSqlServerUpgrade -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ServerVersion 12.0 -ScheduleUpgradeAfterUtcDateTime $ScheduleTime -DatabaseCollection ($DatabaseMap)

The first command creates a time five minutes in the future by using the Get-Date cmdlet. The command stores the date in the variable $ScheduleTime. For more information, type Get-Help Get-Date.

The second command creates a RecommendedDatabaseProperties object, and then stores that object in the variable $DatabaseMap.

The next three commands assign values to properties of the object stored in $DatabaseMap.

The final command upgrades the existing server named Server01 to version 12.0. The earliest time to upgrade is five minutes after you run the command, as specified by the $ScheduleTime variable. After the upgrade, the database contosodb will be running the Standard edition and have the Service Level Objective S0.

Required Parameters

-ResourceGroupName

Specifies the name of the resource group to which the server is assigned.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the name of the server that this cmdlet upgrades.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerVersion

Specifies the version to which this cmdlet upgrades the server. The only valid value is 12.0.

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

Optional Parameters

-DatabaseCollection

Specifies an array of RecommendedDatabaseProperties objects that this cmdlet uses for the server upgrade.

Type:RecommendedDatabaseProperties[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ElasticPoolCollection

Specifies an array of UpgradeRecommendedElasticPoolProperties objects to use for the server upgrade.

Type:UpgradeRecommendedElasticPoolProperties[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScheduleUpgradeAfterUtcDateTime

Specifies the earliest time, as a DateTime object, to upgrade the server. Specify a value in the ISO8601 format, in Coordinated Universal Time (UTC). For more information, type Get-Help Get-Date.

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

Outputs

Microsoft.Azure.Commands.Sql.ServerUpgrade.Model.AzureSqlServerUpgradeModel