Most organizations working with Azure Synapse Analtytics keep running the synapse pool during most of the day when most of their internal development and testing teams are active.
In order to reduce the cost with Azure Synapse, we need to consider below points,
- Understand when the pool is idle during/after business hours
- Look for active sessions periodically and take a decision to pause the synapse
- Resume the synapse pool based on the demand or daily in the morning
Steps to Enable Auto Pause/Resume Synapse Analytics Pool
Understand when the pool is idle during/after business hours
Understanding of idle pool time for different organizations differs based on each team. You can configure your pattern based on your organizations/team WoW.
Look for active sessions periodically and take a decision to pause the synapse
Create an Azure Devops release pipeline and add Azure Powershell Task referring to below powershell task,
https://github.com/sagu94271/seaa/blob/main/Devops/Powershell/autoshutsynapsesqlpool.ps1
Resume the synapse pool based on the demand or daily in the morning
Create a release pipeline, add powershell task to resume synapse pool and schedule it to run daily morning or on adhoc basis.
Resume-AzSqlDatabase –ResourceGroupName “myResourceGroup” ` –ServerName “sqlpoolservername” -DatabaseName “mySampleDataWarehouse”