Reputation: 29
We created a new Elastic Pool and moved some databases in. Databases in the old Elastic Pool had all databases with CAP_CPU and MAX_CPU as 85. In the new pool they are 45. How do I match the old values?
Upvotes: 0
Views: 68
Reputation: 15694
The following instructions work only on Azure Elastic Pools based on vCore Model. On Azure Elastic Pools based on DTU-Model the following instructions have no impact on the max_cpu and cap_cpu values at the database level. On the DTU-model you cannot adjust cores because DTU represents blended measure of cores, IO, log and memory.
You can use Azure Portal, search for the elastic pool, select Configure on the Resource Menu, make a click on Per Database Settings tab, and use the buttons on the slides to configure the min (left button on the slider) and max (right button) as shown on below image:
After adjusting the cores at the pool level also I was able to increase the CAP_CPU and MAX_CPU at the database level.
You can also use a Terraform provider named azurerm_mssql_elasticpool. I found it better, easier to configure an Azure Elastic Pool using Terraform compared with CLI, PowerShell and even the Azure Portal. See min_capacity and max_capacity on below example:
resource "azurerm_resource_group" "example" {
name = "my-resource-group"
location = "West Europe"
}
resource "azurerm_mssql_server" "example" {
name = "my-sql-server"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
version = "12.0"
administrator_login = "4dm1n157r470r"
administrator_login_password = "4-v3ry-53cr37-p455w0rd"
}
resource "azurerm_mssql_elasticpool" "example" {
name = "test-epool"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
server_name = azurerm_mssql_server.example.name
license_type = "LicenseIncluded"
max_size_gb = 756
sku {
name = "BasicPool"
tier = "Basic"
family = "Gen4"
capacity = 4
}
per_database_settings {
min_capacity = 0.25
max_capacity = 4
}
}
The above code extracted from here.
Upvotes: 0