Azure SQL elastic pool pausing feature

Jack Wong 10 Reputation points
2023-08-21T09:08:26.2633333+00:00

Hello,

There are 5 databases I need to host on Azure SQL. They will only be used during week day work hours (i.e. 10 hours a day), so it would be great if they can be paused during the night so that we can save cost.

I was wondering if an elastic pool vCore provision server can be paused?

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tech-Hyd-1989 5,746 Reputation points
    2023-08-21T10:22:30.05+00:00

    Hello Jack Wong

    Yes, an elastic pool vCore provisioned server can be paused. You can do this by changing the compute tier of the elastic pool to Serverless. In the serverless compute tier, the database is automatically paused when it is inactive for a period of time that you specify. The database is automatically resumed when the next login or other activity occurs.

    To change the compute tier of an elastic pool, you can follow these steps:

    1. Go to the Azure portal and sign in to your account.
    2. Select the Azure SQL resource that contains the elastic pool.
    3. In the left navigation menu, select Elastic Pools.
    4. Select the elastic pool that you want to change the compute tier for.
    5. In the Settings section, select Compute Tier.
    6. Select Serverless.
    7. Click Save.

    Once you have changed the compute tier to serverless, the database will be paused after the idle time that you specified. You can view the idle time in the Auto-pause delay setting.

    Here are some things to keep in mind:

    • When a database is paused in the serverless compute tier, you will not be charged for the compute resources. However, you will still be charged for the storage resources that are used by the database.
    • The database will be automatically resumed when the next login or other activity occurs.
    • If you want to prevent the database from being paused, you can disable auto-pause. To do this, set the Auto-pause delay setting to 0.

    I hope this helps! Let me know if you have any other questions.


  2. Oury Ba-MSFT 16,731 Reputation points Microsoft Employee
    2023-08-21T17:50:27.1366667+00:00

    @Jack Wong Thank you for reaching out.

    As mentioned above by Jack Wong

    I would recommend going to Azure SQL Database serverless compute tier.

    Serverless is a compute tier for single databases in Azure SQL Database that automatically scales compute based on workload demand and bills for the amount of compute used per second. The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed and automatically resumes databases when activity returns. The serverless compute tier is available in the General Purpose service tier and currently in preview in the Hyperscale service tier.

    Please read more below for a better understanding.

    Serverless compute tier for Azure SQL Database

    Performance configuration

    You can set up an auto-paused delay which is a configurable parameter that defines the period of time the database must be inactive before it is automatically paused. The database is automatically resumed when the next login or other activity occurs. Alternatively, automatic pausing can be disabled.

    In addition to the above

    For optimal cost efficiency in predictably timed size needs – Azure Automation with a PowerShell runbook (https://learn.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual) coupled with the Set-AzSqlDatabase cmdlet can perform the daily scale up/down.

    Sample: https://learn.microsoft.com/en-us/azure/azure-sql/database/scripts/monitor-and-scale-database-powershell?view=azuresql-db

    Cmdlet reference: https://learn.microsoft.com/en-us/powershell/module/az.sql/set-azsqldatabase?view=azps-10.2.0

    Hope that is helpful.

    Regards,

    Oury