Please see the additional context for the full command output.
again sets the capacity correctly.
{
"autoPauseDelay": 60,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"createMode": null,
"creationDate": "2022-03-15T12:57:22.940000+00:00",
"currentBackupStorageRedundancy": "Local",
"currentServiceObjectiveName": "GP_S_Gen5_2",
"currentSku": {
"capacity": 2,
"family": "Gen5",
"name": "GP_S_Gen5",
"size": null,
"tier": "GeneralPurpose"
},
"databaseId": "some-id",
"defaultSecondaryLocation": "northeurope",
"earliestRestoreDate": "2022-07-11T13:00:42.789103+00:00",
"edition": "GeneralPurpose",
"elasticPoolId": null,
"elasticPoolName": null,
"failoverGroupId": null,
"federatedClientId": null,
"highAvailabilityReplicaCount": null,
"id": "/subscriptions/<subscription>/resourceGroups/ResourceGroup/providers/Microsoft.Sql/servers/uniform-name/databases/uniform-name",
"identity": null,
"isInfraEncryptionEnabled": false,
"kind": "v12.0,user,vcore,serverless",
"ledgerOn": false,
"licenseType": null,
"location": "westeurope",
"longTermRetentionBackupResourceId": null,
"maintenanceConfigurationId": "/subscriptions/<subscription>/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"managedBy": null,
"maxLogSizeBytes": 193273528320,
"maxSizeBytes": 268435456000,
"minCapacity": 0.5,
"name": "uniform-name",
"pausedDate": null,
"primaryDelegatedIdentityClientId": null,
"readScale": "Disabled",
"recoverableDatabaseId": null,
"recoveryServicesRecoveryPointId": null,
"requestedBackupStorageRedundancy": "Local",
"requestedServiceObjectiveName": "GP_S_Gen5_2",
"resourceGroup": "ResourceGroup",
"restorableDroppedDatabaseId": null,
"restorePointInTime": null,
"resumedDate": "2022-07-18T12:36:08.947000+00:00",
"sampleName": null,
"secondaryType": null,
"sku": {
"capacity": 2,
"family": "Gen5",
"name": "GP_S_Gen5",
"size": null,
"tier": "GeneralPurpose"
},
"sourceDatabaseDeletionDate": null,
"sourceDatabaseId": null,
"status": "Online",
"tags": {
"managed-by": "pulumi",
"pulumi-project-name": "some-project",
"stage": "qa"
},
"type": "Microsoft.Sql/servers/databases",
"zoneRedundant": false
}
{
"autoPauseDelay": null,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"createMode": null,
"creationDate": "2022-03-15T12:57:22.940000+00:00",
"currentBackupStorageRedundancy": "Local",
"currentServiceObjectiveName": "S0",
"currentSku": {
"capacity": 10,
"family": null,
"name": "Standard",
"size": null,
"tier": "Standard"
},
"databaseId": "some-id",
"defaultSecondaryLocation": "northeurope",
"earliestRestoreDate": "2022-07-11T13:02:31.261159+00:00",
"edition": "Standard",
"elasticPoolId": null,
"elasticPoolName": null,
"failoverGroupId": null,
"federatedClientId": null,
"highAvailabilityReplicaCount": null,
"id": "/subscriptions/<subscription>/resourceGroups/ResourceGroup/providers/Microsoft.Sql/servers/uniform-name/databases/uniform-name",
"identity": null,
"isInfraEncryptionEnabled": false,
"kind": "v12.0,user",
"ledgerOn": false,
"licenseType": null,
"location": "westeurope",
"longTermRetentionBackupResourceId": null,
"maintenanceConfigurationId": "/subscriptions/<subscription>/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"managedBy": null,
"maxLogSizeBytes": null,
"maxSizeBytes": 268435456000,
"minCapacity": null,
"name": "uniform-name",
"pausedDate": null,
"primaryDelegatedIdentityClientId": null,
"readScale": "Disabled",
"recoverableDatabaseId": null,
"recoveryServicesRecoveryPointId": null,
"requestedBackupStorageRedundancy": "Local",
"requestedServiceObjectiveName": "S0",
"resourceGroup": "ResourceGroup",
"restorableDroppedDatabaseId": null,
"restorePointInTime": null,
"resumedDate": null,
"sampleName": null,
"secondaryType": null,
"sku": {
"capacity": 10,
"family": null,
"name": "Standard",
"size": null,
"tier": "Standard"
},
"sourceDatabaseDeletionDate": null,
"sourceDatabaseId": null,
"status": "Online",
"tags": {
"managed-by": "pulumi",
"pulumi-project-name": "some-project",
"stage": "qa"
},
"type": "Microsoft.Sql/servers/databases",
"zoneRedundant": false
}
Related command
az sql db updateDescribe the bug
Updating from a serverless vCore service model with capacity 2 to a DTU model with service objective 3 sets a wrong capacity.
To Reproduce
The first cli call sets the db to vCore serverless, the second switches to DTU with implied capacity 100 (service-objective S3) which reveals the bug.
az sql db update \ --compute-model Serverless \ --capacity 2 \ --edition GeneralPurpose \ --family Gen5 \ --resource-group ResourceGroup \ --server uniform-name \ --name uniform-name \ && \ az sql db update \ --edition Standard \ --service-objective S3 \ --resource-group ResourceGroup \ --server uniform-name \ --name uniform-nameEventually yields
{ "currentServiceObjectiveName": "S0", "requestedServiceObjectiveName": "S0", "sku": { "capacity": 10, "family": null, "name": "Standard", "size": null, "tier": "Standard" } }The lack of capacity is confirmed by
Please see the additional context for the full command output.
Expected behavior
The update command should
{ "currentServiceObjectiveName": "S3", "requestedServiceObjectiveName": "S3", "sku": { "capacity": 100, "family": null, "name": "Standard", "size": null, "tier": "Standard" } }Environment summary
Additional context
Running
az sql db update \ --edition Standard \ --service-objective S3 \ --resource-group ResourceGroup \ --server uniform-name \ --name uniform-nameagain sets the capacity correctly.
Full command output:
{ "autoPauseDelay": 60, "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", "collation": "SQL_Latin1_General_CP1_CI_AS", "createMode": null, "creationDate": "2022-03-15T12:57:22.940000+00:00", "currentBackupStorageRedundancy": "Local", "currentServiceObjectiveName": "GP_S_Gen5_2", "currentSku": { "capacity": 2, "family": "Gen5", "name": "GP_S_Gen5", "size": null, "tier": "GeneralPurpose" }, "databaseId": "some-id", "defaultSecondaryLocation": "northeurope", "earliestRestoreDate": "2022-07-11T13:00:42.789103+00:00", "edition": "GeneralPurpose", "elasticPoolId": null, "elasticPoolName": null, "failoverGroupId": null, "federatedClientId": null, "highAvailabilityReplicaCount": null, "id": "/subscriptions/<subscription>/resourceGroups/ResourceGroup/providers/Microsoft.Sql/servers/uniform-name/databases/uniform-name", "identity": null, "isInfraEncryptionEnabled": false, "kind": "v12.0,user,vcore,serverless", "ledgerOn": false, "licenseType": null, "location": "westeurope", "longTermRetentionBackupResourceId": null, "maintenanceConfigurationId": "/subscriptions/<subscription>/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", "managedBy": null, "maxLogSizeBytes": 193273528320, "maxSizeBytes": 268435456000, "minCapacity": 0.5, "name": "uniform-name", "pausedDate": null, "primaryDelegatedIdentityClientId": null, "readScale": "Disabled", "recoverableDatabaseId": null, "recoveryServicesRecoveryPointId": null, "requestedBackupStorageRedundancy": "Local", "requestedServiceObjectiveName": "GP_S_Gen5_2", "resourceGroup": "ResourceGroup", "restorableDroppedDatabaseId": null, "restorePointInTime": null, "resumedDate": "2022-07-18T12:36:08.947000+00:00", "sampleName": null, "secondaryType": null, "sku": { "capacity": 2, "family": "Gen5", "name": "GP_S_Gen5", "size": null, "tier": "GeneralPurpose" }, "sourceDatabaseDeletionDate": null, "sourceDatabaseId": null, "status": "Online", "tags": { "managed-by": "pulumi", "pulumi-project-name": "some-project", "stage": "qa" }, "type": "Microsoft.Sql/servers/databases", "zoneRedundant": false } { "autoPauseDelay": null, "catalogCollation": "SQL_Latin1_General_CP1_CI_AS", "collation": "SQL_Latin1_General_CP1_CI_AS", "createMode": null, "creationDate": "2022-03-15T12:57:22.940000+00:00", "currentBackupStorageRedundancy": "Local", "currentServiceObjectiveName": "S0", "currentSku": { "capacity": 10, "family": null, "name": "Standard", "size": null, "tier": "Standard" }, "databaseId": "some-id", "defaultSecondaryLocation": "northeurope", "earliestRestoreDate": "2022-07-11T13:02:31.261159+00:00", "edition": "Standard", "elasticPoolId": null, "elasticPoolName": null, "failoverGroupId": null, "federatedClientId": null, "highAvailabilityReplicaCount": null, "id": "/subscriptions/<subscription>/resourceGroups/ResourceGroup/providers/Microsoft.Sql/servers/uniform-name/databases/uniform-name", "identity": null, "isInfraEncryptionEnabled": false, "kind": "v12.0,user", "ledgerOn": false, "licenseType": null, "location": "westeurope", "longTermRetentionBackupResourceId": null, "maintenanceConfigurationId": "/subscriptions/<subscription>/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default", "managedBy": null, "maxLogSizeBytes": null, "maxSizeBytes": 268435456000, "minCapacity": null, "name": "uniform-name", "pausedDate": null, "primaryDelegatedIdentityClientId": null, "readScale": "Disabled", "recoverableDatabaseId": null, "recoveryServicesRecoveryPointId": null, "requestedBackupStorageRedundancy": "Local", "requestedServiceObjectiveName": "S0", "resourceGroup": "ResourceGroup", "restorableDroppedDatabaseId": null, "restorePointInTime": null, "resumedDate": null, "sampleName": null, "secondaryType": null, "sku": { "capacity": 10, "family": null, "name": "Standard", "size": null, "tier": "Standard" }, "sourceDatabaseDeletionDate": null, "sourceDatabaseId": null, "status": "Online", "tags": { "managed-by": "pulumi", "pulumi-project-name": "some-project", "stage": "qa" }, "type": "Microsoft.Sql/servers/databases", "zoneRedundant": false }