最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

azure - Change CAP_CPU and MAX_CPU - Stack Overflow

matteradmin7PV0评论

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?

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?

Share Improve this question edited Nov 19, 2024 at 1:46 Alberto Morillo 15.7k3 gold badges28 silver badges31 bronze badges asked Nov 18, 2024 at 20:33 user1709746user1709746 294 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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.

Post a comment

comment list (0)

  1. No comments so far