Start-AzureRmSqlServerUpgrade
Starts the upgrade of a SQL Database server.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Start-AzureRmSqlServerUpgrade
-ServerVersion <String>
[-ScheduleUpgradeAfterUtcDateTime <DateTime>]
[-DatabaseCollection <RecommendedDatabaseProperties[]>]
[-ElasticPoolCollection <UpgradeRecommendedElasticPoolProperties[]>]
-ServerName <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<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.
Parameters
-DatabaseCollection
Specifies an array of RecommendedDatabaseProperties objects that this cmdlet uses for the server upgrade.
Type: | RecommendedDatabaseProperties[] |
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: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of the resource group to which the server is assigned.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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: | Nullable<T>[DateTime] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServerName
Specifies the name of the server that this cmdlet upgrades.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
AzureSqlServerUpgradeStartModel