最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure - Change CAP_CPU and MAX_CPU - Stack Overflow

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论