Automatic pause all Synapse Pools and keeping your subscription costs under control

Published 01-16-2021 11:21 AM 5,949 Views
Microsoft

As Synapse engineer or Synapse Support Engineer you may need to start and test some Pools, and you want this to be the most cost efficient possible. Leaving some Synapse with a lot of DWU left turned on during the weekend because you forget to pause the DW after you shutdown your computers is not a good approach and we can quickly resolve this by using Powershell + Automation accounts.

 

Before we get into the procedure on the automation, just want to show you some details.

 

We currently have two flavors of Synapse

  • Dedicated SQL pools (formerly SQL DW)
    • Old mode where the SQL DW lives in an Azure SQL DB Server that can be shared with regular Azure SQL databases.
    • Internally is a resource of type (Microsoft.SQL)
    • Sample: /subscriptions/xxxxxx/resourceGroups/yyyyyyy/providers/Microsoft.Sql/servers/yyyyyyyy/databases/olddwpool
  • Azure Synapse Analytics - Dedicated SQL pool
    • SQL DW database inside a workspace
    • Internally is a resource of type (Microsoft.Synapse)
    • Sample: /subscriptions/xxxxxx/resourceGroups/yyyyyyy/providers/Microsoft.Synapse/workspaces/yyyyyyyy/sqlPools/dwpool

 

 

This is important to know because we are going to use 2 different scripts to pause the pool

  • Suspend-AzSynapseSqlPool (Az.Synapse)
  • Suspend-AzSqlDatabase (Az.SQL)

 

 

There are 2 versions of the script

  1. Powershell to run from your machine
  2. Using Azure Automation Account

 

1. Powershell to run from your machine

This script you can run from your machine and you can get last version of script at ScriptCollection/Synapse - Pause all DWs.ps1 at master · FonsecaSergio/ScriptCollection · GitHub

 

You are going to need the modules installed

  • Az.Accounts
  • Az.Sql
  • Az.Synapse

 

 

For below script I'm considering that your user is same that you use to admin your Azure Subscription

 

Find a sample below

Context exists
Current credential is sefonsec@microsoft.com
Current subscription is SEFONSEC Microsoft Azure Internal Consumption
---------------------------------------------------------------------------------------------------
Get SQL / Synapse RESOURCES
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
Loop through all Synapse Workspaces
---------------------------------------------------------------------------------------------------
Checking Azure Synapse Workspace [xxxxxxxxxxx_synapse] for Synapse SQL Pools
-> Synapse SQL Pool [dwpool] found with status [Online]
-> Pausing Synapse SQL Pool [dwpool]
-> Synapse SQL Pool [dwpool] paused in 0 hours, 2 minutes and 32 seconds. Current status [Paused]
---------------------------------------------------------------------------------------------------
Loop through all SQL Servers (former SQLDW)
---------------------------------------------------------------------------------------------------
Checking SQL Server [xxxxxxxxxxx-eastus] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-eastus2] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-northeu] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-southcentralus] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-uksouth] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-ukwest] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx] in Resource Group [CSSAzureDB] for Synapse SQL Pools
-> Synapse SQL Pool [SQLDW] found with status [Paused]
Checking SQL Server [xxxxxxxxxxx-byok] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-demo] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx_synapse] in Resource Group [synapseworkspace-managedrg-5da694c3-ae72-4f25-9cc6-626adcf858e6] for Synapse SQL Pools
-> This DB is part of Synapse Workspace - Ignore here Should be done above using Az.Synapse Module
Checking SQL Server [xxxxxxxxxxx-westeu] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools
Checking SQL Server [xxxxxxxxxxx-westus] in Resource Group [CSSAzureDB_OtherRegions] for Synapse SQL Pools

 

A sample with error

Checking Azure Synapse Workspace [xxxxxxxxxxx_synapse] for Synapse SQL Pools
Write-Error: -> Checking Synapse SQL Pool [dwpool] found with status [Resuming]

 

 

2. Using Azure Automation Account

Now we want this to be automated, like as a sample to shutdown every day at 11PM and send me alerts if error happens

 

You can find last version at: ScriptCollection/Synapse - Pause all DWs - Automation Acount.ps1 at master · FonsecaSergio/ScriptCol...

 

1 - Lets first create the Automation Account

2021-01-16 17_03_41-Automation - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png

2 - Make sure to create a Run As Account

 

2021-01-16 17_04_25-Add Automation Account - Microsoft Azure and 7 more pages - Work - Microsoft​ Ed.png

 

3 - By default it already got the contributor permission in the subscription level. You can change that if needed. Or add the any required permissions.

2021-01-16 17_17_14-SEFONSEC Microsoft Azure Internal Consumption - Microsoft Azure and 7 more pages.png

 

4 - You need to install the Az modules. Just go to modules and look for them in the gallery.

2021-01-16 17_22_53-SynapseAutomation - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png

 

5 - Install first the Az.Account because it's a prerequisite for others

2021-01-16 17_23_38-Browse Gallery - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png2021-01-16 17_25_27-Az.Accounts - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png

 

Wait for it to complete

2021-01-16 17_26_10-SynapseAutomation - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png

6 - Do same for 3 modules

  • Az.Accounts
  • Az.Sql
  • Az.Synapse

 

7 - Now go to runbooks and create a new Powershell runbook

2021-01-16 17_19_01-Create a runbook - Microsoft Azure and 7 more pages - Work - Microsoft​ Edge.png

 

8 - Add code from ScriptCollection/Synapse - Pause all DWs - Automation Acount.ps1 at master · FonsecaSergio/ScriptCol...

 

8.1 - Save and Publish. And click on Start to test it

2021-01-16 17_20_04-Edit PowerShell Runbook_ - Microsoft Azure and 7 more pages - Work - Microsoft​ .png

 

2021-01-16 17_20_50-PauseALLDW (SynapseAutomation_PauseALLDW) - Microsoft Azure and 7 more pages - W.png

 

9 - Check output tab

2021-01-16 17_43_05-PauseALLDW 1_16_2021, 5_42 PM - Microsoft Azure and 6 more pages - Work - Micros.png

 

10 - You can now go to schedules and add a new schedule

2021-01-16 17_44_58-PauseALLDW (SynapseAutomation_PauseALLDW) - Microsoft Azure and 6 more pages - W.png

2021-01-16 17_45_54-New Schedule - Microsoft Azure and 6 more pages - Work - Microsoft​ Edge.png

 

11 - You may also want also to be alerted if schedule fail. Just to back to automation account and click on Alerts

 

2021-01-16 17_46_48-SynapseAutomation - Microsoft Azure and 6 more pages - Work - Microsoft​ Edge.png

 

12 - You need to add a condition when alert will fire and what actions will be taken. This action could be email to you or run some process or run another script

2021-01-16 17_47_40-Create alert rule - Microsoft Azure and 6 more pages - Work - Microsoft​ Edge.png

 

13 - First configure the condition. You are going to use the metric Total Jobs (Like total jobs failed)

2021-01-16 17_48_09-Configure signal logic - Microsoft Azure and 6 more pages - Work - Microsoft​ Ed.png

 

14 - Define

 - runbook name

 - status (Add custom status "Failed")

 - Threshold > 0

 - Run every hour

 

2021-01-16 17_49_13-Configure signal logic - Microsoft Azure and 6 more pages - Work - Microsoft​ Ed.png

 

15 - Add now the action group. In this case, send email to me

 

2021-01-16 17_50_59-Email_SMS message_Push_Voice - Microsoft Azure and 6 more pages - Work - Microso.png

2021-01-16 17_50_35-Create action group - Microsoft Azure and 6 more pages - Work - Microsoft​ Edge.png

 

You are now set. So your DW will be stopped at 11PM if some error happen you will be alerted like as a sample when a DW is in a state that could not be paused.

 

Another last tip is to use the Azure Budget control I got from my colleague @Gonçalo Ventura 

 

Create a budget and alert

The budget puts a maximum limit on the cost of the subscription, in case some service is left running the subscription will automatically suspend when the budget is reached.

To avoid reaching the max limit and let the subscription go into suspended mode, it is possible to create an alert when the cost reaches a percentage of the budget.

To configure a budget, go to “Subscriptions" or “Cost Management + Billing”, then click on Budgets and fill in the parameters for your budget:

 

FonsecaSergio_0-1610820243993.png

 

 

Click next and set an alert:

FonsecaSergio_1-1610820244008.png

 

Because you do not have only Synapse in your subscription, you may have VMs, SQL DBs, etc.

 

 

9 Comments

Thank you @FonsecaSergio for Sharing with the Community :cool:

Occasional Visitor

This is awesome, thank you! I also made a couple small adjustments to the script so I can run one to resume the SQL Pools as well. Now I can have a script run to resume all pools, schedule all my pipelines and dataflows to run and then have another script run after the flows/pipelines are completed to pause the SQL Pools. Now they'll only be running for the precise hours that they're needed. Thanks again, @FonsecaSergio!

@JordanJohnson What did you add to make the SQL Pool resume?

Occasional Visitor

@Lee_Schuenemeyer, I basically wrote the inverse of his script commands. So I used the command "$SynapseSqlPool | Resume-AzSynapseSqlPool" rather than the command to pause the pool. Here's the script for the foreach loop where I iterate through all the sql pools for the subscription.

foreach ($SynapseSqlPool in $SynapseSqlPools) {
        
        ##########################################################################################################################################################
        if ($SynapseSqlPool.Status -eq "Online") {
            Write-Output "  -> Synapse SQL Pool [$($SynapseSqlPool.SqlPoolName)] found with status [Online]"
        }
        ##########################################################################################################################################################
        elseif ($SynapseSqlPool.Status -eq "Paused") {
            Write-Output "  -> Synapse SQL Pool [$($SynapseSqlPool.SqlPoolName)] found with status [Paused]"
            # Start Synapse SQL Pool
            $startTimeResume = Get-Date
            Write-Output "  -> Resuming Synapse SQL Pool [$($SynapseSqlPool.SqlPoolName)]"
            
            if (!$debug) {
                $resultsynapseSqlPool = $SynapseSqlPool | Resume-AzSynapseSqlPool
            }
            
            # Show that the Synapse SQL Pool has been resumed and how long it took
            $endTimeResume = Get-Date
            $durationResume = NEW-TIMESPAN –Start $startTimeResume –End $endTimeResume

            if ($resultsynapseSqlPool.Status -eq "Online") {
                Write-Output "  -> Synapse SQL Pool [$($resultsynapseSqlPool.SqlPoolName)] resumed in $($durationResume.Hours) hours, $($durationResume.Minutes) minutes and $($durationResume.Seconds) seconds. Current status [$($resultsynapseSqlPool.Status)]"
            }
            else {
                if (!$debug) {
                    $iErrorCount += 1;
                    Write-Error "  -> (resultsynapseSqlPool.Status -ne ""Online"") - Synapse SQL Pool [$($resultsynapseSqlPool.SqlPoolName)] resumed in $($durationResume.Hours) hours, $($durationResume.Minutes) minutes and $($durationResume.Seconds) seconds. Current status [$($resultsynapseSqlPool.Status)]"
                }
                else {
                    Write-Host "This is a debug session - Nothing was done" -ForegroundColor Yellow
                }
            }           
        }
        ##########################################################################################################################################################
        else {
            $iErrorCount += 1;
            Write-Error "  -> (SynapseSqlPool.Status -eq ""Online"") Checking Synapse SQL Pool [$($SynapseSqlPool.SqlPoolName)] found with status [$($SynapseSqlPool.Status)]"
        }
        ##########################################################################################################################################################
    }    
}
Established Member

Hi @FonsecaSergio ,

 

I was trying to configure automation such that a failed connection attempt to dedicated SQL pool will trigger a auto-resume script. It appears that the resource in old mode and new mode have some difference that impacts my ability to implement this.

 

The old mode (type Microsoft.Sql/servers/databases) has a metric type named "connection_failed", and it can be used to trigger an action to execute the runbook to resume the pool. The new mode (type Microsoft.Synapse/workspaces/sqlPools) however, is missing an equivalent metric type. With this difference, I will not be able to automatically resume pool triggered by failed connect, with a straightforward configuration. 

 

Can you advise if there's a way to alert on failed connection attempt for the new resource type? I assume switching back to old mode is not an elegant option.

 

 

Occasional Visitor

@digihunch, did you try using the BuiltinSqlPoolLoginAttempts metric (type Microsoft.Synapse/workspaces)? It's under the workspaces section, just above the documentation referenced link you included.

Established Member

@JordanJohnson Thanks. I'm not sure if that will work in my scenario. I have a dedicated SQL pool in addition to the default built in (serverless) sql pool. 

digihunch_0-1618421037977.png

 

1. The BuiltinSqlPoolLoginAttempts metric appears to point to that built in pool. and the other pool is what i need auto-pause and auto-resume for.

2. The metric counts successful login attempts as well. On the console, it comes off as simply "Login Attempts" with the description "count of login attempts that succeeded or failed".

 

I know the old mode (sql dw) can resume on failed connection based on this configuration, but it is probably not doable anymore in the new mode. Instead, I am evaluating an alternative (add webhook to runbooks and fire a REST request from web activity within Synapse pipeline

Occasional Visitor

@digihunch I was thinking it was a long shot, but since it was the only thing relevant that I've seen and no one else has posted anything I figured it might be worth a shot. Sounds like you're headed in the right direction with it though. Good luck! Hope you're able to figure something out!

 

I was able to convince the powers-at-be to sign up for a 3-year reserved instance on the dedicated pool so we can have our dw running 24/7 and the price is discounted ~65% so I'm glad I don't have to deal with these workarounds any more and the price is just as cheap, if not less than it was when I was spinning the server down as often as we could afford. Highly recommend going that route. Willing to help if I'm able.

Occasional Visitor

We do already have a script to pause and resume the dedicated pools, but sometimes a pool was already resumed/ paused by another user. How can I find out when (and by whom) a deicated pool was paused/resumed?

%3CLINGO-SUB%20id%3D%22lingo-sub-2067298%22%20slang%3D%22en-US%22%3EAutomatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2067298%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20Synapse%20engineer%20or%20Synapse%20Support%20Engineer%20you%20may%20need%20to%20start%20and%20test%20some%20Pools%2C%20and%20you%20want%20this%20to%20be%20the%20most%20%3CSTRONG%3Ecost%20efficient%3C%2FSTRONG%3E%20possible.%20Leaving%20some%20Synapse%20with%20a%20lot%20of%20DWU%20left%20turned%20on%20during%20the%20weekend%20because%20you%20forget%20to%20pause%20the%20DW%20after%20you%20shutdown%20your%20computers%20is%20not%20a%20good%20approach%20and%20we%26nbsp%3Bcan%20quickly%20resolve%20this%20by%20using%20%3CSTRONG%3EPowershell%20%2B%20Automation%20accounts.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBefore%20we%20get%20into%20the%20procedure%20on%20the%20automation%2C%20just%20want%20to%20show%20you%20some%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20currently%20have%20two%20flavors%20of%20Synapse%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EDedicated%20SQL%20pools%20(formerly%20SQL%20DW)%3C%2FSTRONG%3E%3CUL%3E%0A%3CLI%3EOld%20mode%20where%20the%20SQL%20DW%20lives%20in%20an%20Azure%20SQL%20DB%20Server%20that%20can%20be%20shared%20with%20regular%20Azure%20SQL%20databases.%3C%2FLI%3E%0A%3CLI%3EInternally%20is%20a%20resource%20of%20type%20(%3CSTRONG%3EMicrosoft.SQL%3C%2FSTRONG%3E)%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3ESample%3A%20%2Fsubscriptions%2F%3CSTRONG%3Exxxxxx%3C%2FSTRONG%3E%2FresourceGroups%2F%3CSTRONG%3Eyyyyyyy%3C%2FSTRONG%3E%2Fproviders%2FMicrosoft.Sql%2Fservers%2F%3CSTRONG%3Eyyyyyyyy%3C%2FSTRONG%3E%2Fdatabases%2F%3CSTRONG%3Eolddwpool%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EAzure%20Synapse%20Analytics%20-%20Dedicated%20SQL%20pool%20%3C%2FSTRONG%3E%3CUL%3E%0A%3CLI%3ESQL%20DW%20database%20inside%20a%20workspace%3C%2FLI%3E%0A%3CLI%3EInternally%20is%20a%20resource%20of%20type%20(%3CSTRONG%3EMicrosoft.Synapse%3C%2FSTRONG%3E)%3C%2FLI%3E%0A%3CLI%3ESample%3A%26nbsp%3B%3CSPAN%3E%2Fsubscriptions%2F%3CSTRONG%3Exxxxxx%3C%2FSTRONG%3E%2FresourceGroups%2F%3CSTRONG%3Eyyyyyyy%3C%2FSTRONG%3E%2Fproviders%2F%3CSTRONG%3EMicrosoft.Synapse%3C%2FSTRONG%3E%2Fworkspaces%2F%3CSTRONG%3Eyyyyyyyy%3C%2FSTRONG%3E%2FsqlPools%2F%3CSTRONG%3Edwpool%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20important%20to%20know%20because%20we%20are%20going%20to%20use%202%20different%20scripts%20to%20pause%20the%20pool%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESuspend-AzSynapseSqlPool%20(%3CSTRONG%3EAz.Synapse%3C%2FSTRONG%3E)%3C%2FLI%3E%0A%3CLI%3ESuspend-AzSqlDatabase%20(%3CSTRONG%3EAz.SQL%3C%2FSTRONG%3E)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%202%20versions%20of%20the%20script%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CSTRONG%3EPowershell%20to%20run%20from%20your%20machine%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EUsing%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fautomation%2Fautomation-intro%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Automation%20Account%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1946178836%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946179513%22%20id%3D%22toc-hId-1946175955%22%3E1.%20Powershell%20to%20run%20from%20your%20machine%3C%2FH3%3E%0A%3CP%3EThis%20script%20you%20can%20run%20from%20your%20machine%20and%20you%20can%20get%20last%20version%20of%20script%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FFonsecaSergio%2FScriptCollection%2Fblob%2Fmaster%2FPowershell%2FSynapse%2520-%2520Pause%2520all%2520DWs.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EScriptCollection%2FSynapse%20-%20Pause%20all%20DWs.ps1%20at%20master%20%C2%B7%20FonsecaSergio%2FScriptCollection%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20are%20going%20to%20need%20the%20modules%20installed%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAz.Accounts%3C%2FLI%3E%0A%3CLI%3EAz.Sql%3C%2FLI%3E%0A%3CLI%3EAz.Synapse%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fazure%2Fnew-azureps-module-az%3Fview%3Dazps-5.3.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntroducing%20the%20Azure%20Az%20PowerShell%20module%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FAz%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EPowerShell%20Gallery%20%7C%20Az%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FAz.Synapse%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EPowerShell%20Gallery%20%7C%20Az.Synapse%3C%2FA%3E%3CUL%3E%0A%3CLI%3EAt%20this%20point%20in%20time%2C%20the%20Az%20Module%20(5.3.0)%20does%20not%20include%20Az.Synapse%20by%20default.%20You%20need%20to%20install%20both%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20below%20script%20I'm%20considering%20that%20your%20user%20is%20same%20that%20you%20use%20to%20admin%20your%20Azure%20Subscription%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFind%20a%20sample%20below%3C%2FP%3E%0A%3CPRE%3EContext%20exists%3CBR%20%2F%3ECurrent%20credential%20is%20sefonsec%40microsoft.com%3CBR%20%2F%3ECurrent%20subscription%20is%20SEFONSEC%20Microsoft%20Azure%20Internal%20Consumption%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3EGet%20SQL%20%2F%20Synapse%20RESOURCES%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3ELoop%20through%20all%20Synapse%20Workspaces%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3EChecking%20Azure%20Synapse%20Workspace%20%5B%3CEM%3Exxxxxxxxxxx_%3C%2FEM%3Esynapse%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E-%26gt%3B%20Synapse%20SQL%20Pool%20%5Bdwpool%5D%20found%20with%20status%20%5BOnline%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E-%26gt%3B%20Pausing%20Synapse%20SQL%20Pool%20%5Bdwpool%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3E-%26gt%3B%20Synapse%20SQL%20Pool%20%5Bdwpool%5D%20paused%20in%200%20hours%2C%202%20minutes%20and%2032%20seconds.%20Current%20status%20%5BPaused%5D%3C%2FFONT%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3ELoop%20through%20all%20SQL%20Servers%20(former%20SQLDW)%3CBR%20%2F%3E---------------------------------------------------------------------------------------------------%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-eastus%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx-%3C%2FEM%3Eeastus2%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-northeu%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-southcentralus%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-uksouth%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-ukwest%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E%5D%20in%20Resource%20Group%20%5BCSSAzureDB%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3E-%26gt%3B%20Synapse%20SQL%20Pool%20%5BSQLDW%5D%20found%20with%20status%20%5BPaused%5D%3C%2FFONT%3E%3C%2FSTRONG%3E%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx-%3C%2FEM%3Ebyok%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx-%3C%2FEM%3Edemo%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx_%3C%2FEM%3Esynapse%5D%20in%20Resource%20Group%20%5Bsynapseworkspace-managedrg-5da694c3-ae72-4f25-9cc6-626adcf858e6%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3E-%26gt%3B%20This%20DB%20is%20part%20of%20Synapse%20Workspace%20-%20Ignore%20here%20Should%20be%20done%20above%20using%20Az.Synapse%20Module%3C%2FFONT%3E%3C%2FSTRONG%3E%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-westeu%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3CBR%20%2F%3EChecking%20SQL%20Server%20%5B%3CEM%3Exxxxxxxxxxx%3C%2FEM%3E-westus%5D%20in%20Resource%20Group%20%5BCSSAzureDB_OtherRegions%5D%20for%20Synapse%20SQL%20Pools%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20sample%20with%20error%3C%2FP%3E%0A%3CPRE%3E%3CEM%3EChecking%20Azure%20Synapse%20Workspace%20%5Bxxxxxxxxxxx_synapse%5D%20for%20Synapse%20SQL%20Pools%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CFONT%20color%3D%22%23FF0000%22%3EWrite-Error%3A%20-%26gt%3B%20Checking%20Synapse%20SQL%20Pool%20%5Bdwpool%5D%20found%20with%20status%20%5BResuming%5D%3C%2FFONT%3E%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-138724373%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138725050%22%20id%3D%22toc-hId-138721492%22%3E2.%20Using%26nbsp%3BAzure%20Automation%20Account%3C%2FH3%3E%0A%3CP%3ENow%20we%20want%20this%20to%20be%20automated%2C%20like%20as%20a%20sample%20to%20shutdown%20every%20day%20at%2011PM%20and%20send%20me%20alerts%20if%20error%20happens%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20last%20version%20at%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FFonsecaSergio%2FScriptCollection%2Fblob%2Fmaster%2FPowershell%2FSynapse%2520-%2520Pause%2520all%2520DWs%2520-%2520Automation%2520Acount.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EScriptCollection%2FSynapse%20-%20Pause%20all%20DWs%20-%20Automation%20Acount.ps1%20at%20master%20%C2%B7%20FonsecaSergio%2FScriptCollection%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1%20-%20Lets%20first%20create%20the%20%3CSTRONG%3EAutomation%20Account%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_03_41-Automation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246940i386A59B350601715%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_03_41-Automation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_03_41-Automation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2%20-%20Make%20sure%20to%20create%20a%20%3CSTRONG%3ERun%20As%20Account%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_04_25-Add%20Automation%20Account%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20style%3D%22width%3A%20254px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246942iE1804E53C2724EEB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_04_25-Add%20Automation%20Account%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20alt%3D%222021-01-16%2017_04_25-Add%20Automation%20Account%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Ed.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E3%20-%20By%20default%20it%20already%20got%20the%20%3CSTRONG%3Econtributor%3C%2FSTRONG%3E%20permission%20in%20the%20%3CSTRONG%3Esubscription%20level%3C%2FSTRONG%3E.%20You%20can%20change%20that%20if%20needed.%20Or%20add%20the%20any%20required%20permissions.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_17_14-SEFONSEC%20Microsoft%20Azure%20Internal%20Consumption%20-%20Microsoft%20Azure%20and%207%20more%20pages.png%22%20style%3D%22width%3A%20700px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246943i25D40E543CD01400%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_17_14-SEFONSEC%20Microsoft%20Azure%20Internal%20Consumption%20-%20Microsoft%20Azure%20and%207%20more%20pages.png%22%20alt%3D%222021-01-16%2017_17_14-SEFONSEC%20Microsoft%20Azure%20Internal%20Consumption%20-%20Microsoft%20Azure%20and%207%20more%20pages.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E4%20-%20You%20need%20to%20%3CSTRONG%3Einstall%20the%20Az%20modules%3C%2FSTRONG%3E.%20Just%20go%20to%20%3CSTRONG%3Emodules%3C%2FSTRONG%3E%20and%20look%20for%20them%20in%20the%20%3CSTRONG%3Egallery.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_22_53-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20702px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246946i3C98ED5A38727BDB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_22_53-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_22_53-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E5%20-%20Install%20first%20the%20%3CSTRONG%3EAz.Account%3C%2FSTRONG%3E%20because%20it's%20a%20%3CSTRONG%3Eprerequisite%3C%2FSTRONG%3E%20for%20others%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_23_38-Browse%20Gallery%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20590px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246948iDC6A666000D92D9E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_23_38-Browse%20Gallery%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_23_38-Browse%20Gallery%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_25_27-Az.Accounts%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20208px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246949iC7B62D8DC572F480%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_25_27-Az.Accounts%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_25_27-Az.Accounts%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3EWait%20for%20it%20to%20complete%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_26_10-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20438px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246950i059AD0C414DC3185%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_26_10-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_26_10-SynapseAutomation%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E6%20-%20Do%20same%20for%203%20modules%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAz.Accounts%3C%2FLI%3E%0A%3CLI%3EAz.Sql%3C%2FLI%3E%0A%3CLI%3EAz.Synapse%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E7%20-%20Now%20go%20to%20%3CSTRONG%3Erunbooks%3C%2FSTRONG%3E%20and%20%3CSTRONG%3Ecreate%20a%20new%20Powershell%20runbook%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_19_01-Create%20a%20runbook%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20730px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246944i1792ACC09976F07A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_19_01-Create%20a%20runbook%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_19_01-Create%20a%20runbook%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E8%20-%20Add%20code%20from%26nbsp%3B%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FFonsecaSergio%2FScriptCollection%2Fblob%2Fmaster%2FPowershell%2FSynapse%2520-%2520Pause%2520all%2520DWs%2520-%2520Automation%2520Acount.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EScriptCollection%2FSynapse%20-%20Pause%20all%20DWs%20-%20Automation%20Acount.ps1%20at%20master%20%C2%B7%20FonsecaSergio%2FScriptCollection%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E8.1%20-%20%3CSTRONG%3ESave%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EPublish%3C%2FSTRONG%3E.%20And%20click%20on%26nbsp%3B%3CSTRONG%3EStart%3C%2FSTRONG%3E%20to%20test%20it%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_20_04-Edit%20PowerShell%20Runbook_%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20.png%22%20style%3D%22width%3A%20464px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246947i361CB7E18093546C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_20_04-Edit%20PowerShell%20Runbook_%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20.png%22%20alt%3D%222021-01-16%2017_20_04-Edit%20PowerShell%20Runbook_%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20Work%20-%20Microsoft%20.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_20_50-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20W.png%22%20style%3D%22width%3A%20464px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246945i2FFD514596B4AACE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_20_50-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20W.png%22%20alt%3D%222021-01-16%2017_20_50-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%207%20more%20pages%20-%20W.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E9%20-%20Check%20%3CSTRONG%3Eoutput%3C%2FSTRONG%3E%20tab%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_43_05-PauseALLDW%201_16_2021%2C%205_42%20PM%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Micros.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246963i2C139F303167EDD1%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_43_05-PauseALLDW%201_16_2021%2C%205_42%20PM%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Micros.png%22%20alt%3D%222021-01-16%2017_43_05-PauseALLDW%201_16_2021%2C%205_42%20PM%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Micros.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E10%20-%20You%20can%20now%20go%20to%20%3CSTRONG%3Eschedules%3C%2FSTRONG%3E%20and%20add%20a%20new%20schedule%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_44_58-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20W.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246966i13050B45E837DA47%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_44_58-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20W.png%22%20alt%3D%222021-01-16%2017_44_58-PauseALLDW%20(SynapseAutomation_PauseALLDW)%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20W.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_45_54-New%20Schedule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246964iFF5A7B7CBA38F01C%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_45_54-New%20Schedule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_45_54-New%20Schedule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E11%20-%20You%20may%20also%20want%20also%20to%20be%20%3CSTRONG%3Ealerted%3C%2FSTRONG%3E%20if%20%3CSTRONG%3Eschedule%20fail%3C%2FSTRONG%3E.%20Just%20to%20back%20to%20automation%20account%20and%20click%20on%26nbsp%3B%3CSTRONG%3EAlerts%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_46_48-SynapseAutomation%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246965i7902C8AE188602DD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_46_48-SynapseAutomation%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_46_48-SynapseAutomation%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E12%20-%20You%20need%20to%20add%20a%20%3CSTRONG%3Econdition%3C%2FSTRONG%3E%20when%20alert%20will%20fire%20and%20what%20%3CSTRONG%3Eactions%3C%2FSTRONG%3E%20will%20be%20taken.%20This%20action%20could%20be%20email%20to%20you%20or%20run%20some%20process%20or%20run%20another%20script%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_47_40-Create%20alert%20rule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20981px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246967i3900AFDA165F8F46%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_47_40-Create%20alert%20rule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_47_40-Create%20alert%20rule%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E13%20-%20First%20configure%20the%20%3CSTRONG%3Econdition%3C%2FSTRONG%3E.%20You%20are%20going%20to%20use%20the%20metric%20%3CSTRONG%3ETotal%20Jobs%3C%2FSTRONG%3E%20(Like%20%3CSTRONG%3Etotal%20jobs%20failed%3C%2FSTRONG%3E)%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_48_09-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20style%3D%22width%3A%20804px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246968iDDF1AD4189DAAD12%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_48_09-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20alt%3D%222021-01-16%2017_48_09-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Ed.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E14%20-%20Define%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B-%20runbook%20name%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B-%20status%3C%2FSTRONG%3E%20(Add%20custom%20status%20%22%3CSTRONG%3EFailed%3C%2FSTRONG%3E%22)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B-%20%3CSTRONG%3EThreshold%20%26gt%3B%200%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B-%20Run%20every%20hour%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_49_13-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20style%3D%22width%3A%20820px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246969i07CB0EE3823A296A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_49_13-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Ed.png%22%20alt%3D%222021-01-16%2017_49_13-Configure%20signal%20logic%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Ed.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E15%20-%20Add%20now%20the%20%3CSTRONG%3Eaction%20group%3C%2FSTRONG%3E.%20In%20this%20case%2C%20send%20email%20to%20me%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_50_59-Email_SMS%20message_Push_Voice%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microso.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246971i17609C411BD984E5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_50_59-Email_SMS%20message_Push_Voice%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microso.png%22%20alt%3D%222021-01-16%2017_50_59-Email_SMS%20message_Push_Voice%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microso.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-01-16%2017_50_35-Create%20action%20group%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246970i6B7B73C511ECB119%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%222021-01-16%2017_50_35-Create%20action%20group%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%E2%80%8B%20Edge.png%22%20alt%3D%222021-01-16%2017_50_35-Create%20action%20group%20-%20Microsoft%20Azure%20and%206%20more%20pages%20-%20Work%20-%20Microsoft%20Edge.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20are%20now%20set.%20So%20your%20DW%20will%20be%20stopped%20at%2011PM%20if%20some%20error%20happen%20you%20will%20be%20alerted%20like%20as%20a%20sample%20when%20a%20DW%20is%20in%20a%20state%20that%20could%20not%20be%20paused.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20last%20tip%20is%20to%20use%20the%20%3CSTRONG%3EAzure%20Budget%20control%20%3C%2FSTRONG%3EI%20got%20from%20my%20colleague%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F152926%22%20target%3D%22_blank%22%3E%40Gon%C3%A7alo%20Ventura%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECreate%20a%20budget%20and%20alert%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20budget%20puts%20a%20%3CSTRONG%3Emaximum%20limit%3C%2FSTRONG%3E%20on%20the%20%3CSTRONG%3Ecost%20of%20the%20subscription%3C%2FSTRONG%3E%2C%20in%20case%20some%20service%20is%20left%20running%20the%20subscription%20will%20automatically%20suspend%20when%20the%20budget%20is%20reached.%3C%2FP%3E%0A%3CP%3ETo%20avoid%20reaching%20the%20max%20limit%20and%20let%20the%20subscription%20go%20into%20suspended%20mode%2C%20it%20is%20possible%20to%20create%20an%20alert%20when%20the%20cost%20reaches%20a%20percentage%20of%20the%20budget.%3C%2FP%3E%0A%3CP%3ETo%20configure%20a%20budget%2C%20go%20to%20%E2%80%9C%3CSTRONG%3ESubscriptions%3C%2FSTRONG%3E%22%20or%20%E2%80%9C%3CSTRONG%3ECost%20Management%20%2B%20Billing%3C%2FSTRONG%3E%E2%80%9D%2C%20then%20click%20on%20%3CSTRONG%3EBudgets%3C%2FSTRONG%3E%20and%20fill%20in%20the%20parameters%20for%20your%20budget%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FonsecaSergio_0-1610820243993.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246973i05BFF7DF7F5586CD%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22FonsecaSergio_0-1610820243993.png%22%20alt%3D%22FonsecaSergio_0-1610820243993.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClick%20next%20and%20set%20an%20alert%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FonsecaSergio_1-1610820244008.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246972iD661BCA546B0B93F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22FonsecaSergio_1-1610820244008.png%22%20alt%3D%22FonsecaSergio_1-1610820244008.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBecause%20you%20do%20not%20have%20only%20Synapse%20in%20your%20subscription%2C%20you%20may%20have%20VMs%2C%20SQL%20DBs%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2067298%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20Synapse%20engineer%20or%20Synapse%20Support%20Engineer%20you%20may%20need%20to%20start%20and%20test%20some%20Pools%2C%20and%20you%20want%20this%20to%20be%20the%20most%20%3CSTRONG%3Ecost%20efficient%3C%2FSTRONG%3E%20possible.%20Leaving%20some%20Synapse%20with%20a%20lot%20of%20DWU%20left%20turned%20on%20during%20the%20weekend%20because%20you%20forget%20to%20pause%20the%20DW%20after%20you%20shutdown%20your%20computers%20is%20not%20a%20good%20approach%20and%20we%26nbsp%3Bcan%20quickly%20resolve%20this%20by%20using%20%3CSTRONG%3EPowershell%20%2B%20Automation%20accounts%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2067298%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESynapse%20Administration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESynapse%20DevOps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2068299%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2068299%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F288481%22%20target%3D%22_blank%22%3E%40FonsecaSergio%3C%2FA%3E%26nbsp%3Bfor%20Sharing%20with%20the%20Community%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2Fimages%2Femoticons%2Fcool_40x40.gif%22%20alt%3D%22%3Acool%3A%22%20title%3D%22%3Acool%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2122042%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2122042%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20awesome%2C%20thank%20you!%20I%20also%20made%20a%20couple%20small%20adjustments%20to%20the%20script%20so%20I%20can%20run%20one%20to%20resume%20the%20SQL%20Pools%20as%20well.%20Now%20I%20can%20have%20a%20script%20run%20to%20resume%20all%20pools%2C%20schedule%20all%20my%20pipelines%20and%20dataflows%20to%20run%20and%20then%20have%20another%20script%20run%20after%20the%20flows%2Fpipelines%20are%20completed%20to%20pause%20the%20SQL%20Pools.%20Now%20they'll%20only%20be%20running%20for%20the%20precise%20hours%20that%20they're%20needed.%20Thanks%20again%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F288481%22%20target%3D%22_blank%22%3E%40FonsecaSergio%3C%2FA%3E!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2166877%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2166877%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F963905%22%20target%3D%22_blank%22%3E%40JordanJohnson%3C%2FA%3E%26nbsp%3BWhat%20did%20you%20add%20to%20make%20the%20SQL%20Pool%20resume%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2169638%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2169638%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259698%22%20target%3D%22_blank%22%3E%40Lee_Schuenemeyer%3C%2FA%3E%2C%26nbsp%3BI%20basically%20wrote%20the%20inverse%20of%20his%20script%20commands.%20So%20I%20used%20the%20command%20%22%24SynapseSqlPool%20%7C%20Resume-AzSynapseSqlPool%22%20rather%20than%20the%20command%20to%20pause%20the%20pool.%20Here's%20the%20script%20for%20the%20foreach%20loop%20where%20I%20iterate%20through%20all%20the%20sql%20pools%20for%20the%20subscription.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Eforeach%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ein%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPools%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eif%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status%26nbsp%3B-eq%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22Online%22%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Output%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%26nbsp%3Bfound%26nbsp%3Bwith%26nbsp%3Bstatus%26nbsp%3B%5BOnline%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eelseif%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status%26nbsp%3B-eq%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22Paused%22%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Output%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%26nbsp%3Bfound%26nbsp%3Bwith%26nbsp%3Bstatus%26nbsp%3B%5BPaused%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%26nbsp%3BStart%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24startTimeResume%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%26nbsp%3BGet-Date%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Output%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3BResuming%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eif%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(!%3C%2FSPAN%3E%3CSPAN%3E%24debug%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%7C%26nbsp%3BResume-AzSynapseSqlPool%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%26nbsp%3BShow%26nbsp%3Bthat%26nbsp%3Bthe%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3Bhas%26nbsp%3Bbeen%26nbsp%3Bresumed%26nbsp%3Band%26nbsp%3Bhow%26nbsp%3Blong%26nbsp%3Bit%26nbsp%3Btook%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24endTimeResume%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%26nbsp%3BGet-Date%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%26nbsp%3BNEW-TIMESPAN%26nbsp%3B%E2%80%93Start%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24startTimeResume%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%E2%80%93%3C%2FSPAN%3E%3CSPAN%3EEnd%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24endTimeResume%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eif%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status%26nbsp%3B-eq%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22Online%22%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Output%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%26nbsp%3Bresumed%26nbsp%3Bin%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Hours)%26nbsp%3Bhours%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Minutes)%26nbsp%3Bminutes%26nbsp%3Band%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Seconds)%26nbsp%3Bseconds.%26nbsp%3BCurrent%26nbsp%3Bstatus%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status)%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eelse%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eif%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B(!%3C%2FSPAN%3E%3CSPAN%3E%24debug%3C%2FSPAN%3E%3CSPAN%3E)%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24iErrorCount%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%2B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Error%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3B(resultsynapseSqlPool.Status%26nbsp%3B-ne%26nbsp%3B%22%22Online%22%22)%26nbsp%3B-%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%26nbsp%3Bresumed%26nbsp%3Bin%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Hours)%26nbsp%3Bhours%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Minutes)%26nbsp%3Bminutes%26nbsp%3Band%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24durationResume%3C%2FSPAN%3E%3CSPAN%3E.Seconds)%26nbsp%3Bseconds.%26nbsp%3BCurrent%26nbsp%3Bstatus%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24resultsynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status)%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eelse%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Host%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22This%26nbsp%3Bis%26nbsp%3Ba%26nbsp%3Bdebug%26nbsp%3Bsession%26nbsp%3B-%26nbsp%3BNothing%26nbsp%3Bwas%26nbsp%3Bdone%22%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B-ForegroundColor%26nbsp%3BYellow%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eelse%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%24iErrorCount%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%2B%3D%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BWrite-Error%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%26nbsp%3B%26nbsp%3B-%26gt%3B%26nbsp%3B(SynapseSqlPool.Status%26nbsp%3B-eq%26nbsp%3B%22%22Online%22%22)%26nbsp%3BChecking%26nbsp%3BSynapse%26nbsp%3BSQL%26nbsp%3BPool%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.SqlPoolName)%5D%26nbsp%3Bfound%26nbsp%3Bwith%26nbsp%3Bstatus%26nbsp%3B%5B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%24SynapseSqlPool%3C%2FSPAN%3E%3CSPAN%3E.Status)%5D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2259831%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2259831%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F288481%22%20target%3D%22_blank%22%3E%40FonsecaSergio%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20trying%20to%20configure%20automation%20such%20that%20a%20failed%20connection%20attempt%20to%20dedicated%20SQL%20pool%20will%20trigger%20a%20auto-resume%20script.%20It%20appears%20that%20the%20resource%20in%20old%20mode%20and%20new%20mode%20have%20some%20difference%20that%20impacts%20my%20ability%20to%20implement%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20old%20mode%20(type%26nbsp%3B%3CSTRONG%3EMicrosoft.Sql%2Fservers%2Fdatabases%3C%2FSTRONG%3E)%20has%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fessentials%2Fmetrics-supported%23microsoftsqlserversdatabases%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Emetric%20type%3C%2FA%3E%20named%20%22%3CSPAN%3Econnection_failed%22%2C%20and%20it%20can%20be%20used%20to%20trigger%20an%20action%20to%20execute%20the%20runbook%20to%20resume%20the%20pool.%20The%20new%20mode%20(type%26nbsp%3B%3CSTRONG%3EMicrosoft.Synapse%2Fworkspaces%2FsqlPools%3C%2FSTRONG%3E)%20however%2C%20is%20missing%20an%20equivalent%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fessentials%2Fmetrics-supported%23microsoftsynapseworkspacessqlpools%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Emetric%20type%3C%2FA%3E.%20With%20this%20difference%2C%20I%20will%20not%20be%20able%20to%20automatically%20resume%20pool%20triggered%20by%20failed%20connect%2C%20with%20a%20straightforward%20configuration.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ECan%20you%20advise%20if%20there's%20a%20way%20to%20alert%20on%20failed%20connection%20attempt%20for%20the%20new%20resource%20type%3F%20I%20assume%20switching%20back%20to%20old%20mode%20is%20not%20an%20elegant%20option.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2272873%22%20slang%3D%22en-US%22%3ERe%3A%20Automatic%20pause%20all%20Synapse%20Pools%20and%20keeping%20your%20subscription%20costs%20under%20control%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2272873%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1019817%22%20target%3D%22_blank%22%3E%40digihunch%3C%2FA%3E%2C%26nbsp%3Bdid%20you%20try%20using%20the%20BuiltinSqlPoolLoginAttempts%20metric%20%3CSPAN%3E(type%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMicrosoft.Synapse%2Fworkspaces%3C%2FSTRONG%3E)%3F%20It's%20under%20the%20workspaces%20section%2C%20just%20above%20the%20documentation%20referenced%20link%20you%20included.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎Jan 16 2021 11:21 AM
Updated by: