Start-AzureSqlServerUpgrade

Start-AzureSqlServerUpgrade

Starts the upgrade of an Azure SQL Database server.

Syntax

Parameter Set: Default
Start-AzureSqlServerUpgrade [-ResourceGroupName] <String> -ServerName <String> -ServerVersion <String> [-DatabaseCollection <RecommendedDatabaseProperties[]> ] [-ElasticPoolCollection <Microsoft.Azure.Management.Sql.Models.UpgradeRecommendedElasticPoolProperties[]> ] [-Profile <AzureProfile> ] [-ScheduleUpgradeAfterUtcDateTime <DateTime]> ] [ <CommonParameters>]

Detailed Description

The Start-AzureSqlServerUpgrade cmdlet starts the upgrade of an Azure SQL Database server version 11 to version 12. Monitor the progress of an upgrade by using the Get-AzureSqlServerUpgrade cmdlet.

Parameters

-DatabaseCollection<RecommendedDatabaseProperties[]>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ElasticPoolCollection<Microsoft.Azure.Management.Sql.Models.UpgradeRecommendedElasticPoolProperties[]>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Profile<AzureProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResourceGroupName<String>

Specifies the name of the resource group in which this cmdlet upgrades a server.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ScheduleUpgradeAfterUtcDateTime<DateTime]>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerName<String>

Specifies the name of the server that this cmdlet upgrades.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ServerVersion<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

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

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

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

Examples

Example 1: Upgrade a Simple server upgradeUpgrade a

This command upgrades the server named Server01 in resource group named ResourceGroup11 to version 12.0. Server01 must currently be version 2.0.

PS C:\> Start-AzureSqlServerUpgrade -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -ServerVersion 12.0

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

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

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

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

The final command upgrades the existing server named Server02 in the resource group named ResourceGroup11 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 has the edition Standard and the Service Level Objective value of S0.

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-AzureSqlServerUpgrade -ResourceGroupName "ResourceGroup11" -ServerName "Server02" -ServerVersion 12.0 -ScheduleUpgradeAfterUtcDateTime $ScheduleTime -DatabaseCollection ($DatabaseMap)

Get-AzureSqlServerUpgrade

Stop-AzureSqlServerUpgrade