2023. 12. 21. 11:45

PowerShell을 사용하여 Azure Synapse Analytics SQL 풀 다시 시작

링크 원본

https://davidalzamendi.com/restarting-azure-synapse-analytics-sql-pools/

 

 

 

 

 

##  만약을 위해 페이지 긁어옴

 

 

 

Restarting Azure Synapse Analytics SQL Pools with PowerShell

Let’s have a look at restarting, pausing or resuming an Azure Synapse Analytics SQL Pool database using PowerShell. The PowerShell scripts are quite useful. I built a wrapper to perform all the operations. 

I recently found myself working on a project where restarting the Azure Synapse Analytics SQL Pool (aka Azure SQL Data Warehouse) was a requirement to solve some performance issues. I also believe that it’s good practice to restart it. The activities in the compute nodes are intensive and generate many logs. 

With this script you can perform any of the following activities: 

  • Pausing 
  • Starting 
  • Restarting 

Download the Script 

The script is available through the following link:  

My Github 

Pre-requirements  

Before you can run the script, you need to download the Az Module and log into the Azure tenant. In  upcoming blog posts, I’ll show you how to use an automation account. 

Install Az Module  

Install-Module -Name Az 

Connect to Azure  

Connect-AzAccount  

Execute the Script 

The script has 4 mandatory parameters: 

  • ResourceGroupName: resource group name where the server is being hosted 
  • ServerName: server name that needs to be restarted 
  • DatabaseName: database name that needs to be restarted 
  • Operation: Start/Pause or Restart 
.\Restart-AzSynapseSQLPool.ps1 -ResourceGroupName "YourRGName" -ServerName "YourSQLServerName" -DatabaseName "YourDatabaseName" -Operation "Pause"  

Summary 

In this post, you’ve learned how easy it is to start using PowerShell scripts to manage your database.