Azure SQL Managed Instance – Maintenance Windows

A post close to my heart, Azure SQL Managed Instance, I have blogged about this many times but I feel I should be sharing more details about this. One important topic – Maintenance windows.

Azure SQL MI at its core is a PaaS offering, we know this but there is some flexibility about what customers can do when it comes to maintenance. Its important to remember, that with cloud services we typically don’t do the maintenance but can we control when it happens? With SQL MI yes we can. Before I show you how we can tweak these settings, what does maintenance mean? What will / could Microsoft do? Normally this falls into the “planned” maintenance rather than unplanned i.e. a planned updated / patch which needs a reconfigure of the underlying server, speaking to Microsoft this could last for anything between 30s-60s so ideally we would want this outside of peak business hours right? How can we tweak these windows?

We have 2 options:

  • Weekday window: 10:00 PM to 6:00 AM local time, Monday – Thursday
  • Weekend window: 10:00 PM to 6:00 AM local time, Friday – Sunday

The System default maintenance window is 5PM to 8AM daily.

There are 2 ways you can set this up. First when building the Managed Instance from the start, it will be part of the deployment option as shown below.

Or for existing Managed Instances you will find the option under settings:

Note: same concept also applies to Azure SQL Database and elastic pools

If you do want to change this window, I will paste this warning from directly Microsoft:

“Configuring maintenance window is a long running asynchronous operation, similar to changing the service tier of the Azure SQL resource. The resource is available during the operation, except a short reconfiguration that happens at the end of the operation and typically lasts up to 8 seconds even in case of interrupted long-running transactions. To minimize the impact of the reconfiguration you should perform the operation outside of the peak hours.”

Advertisement

1 thought on “Azure SQL Managed Instance – Maintenance Windows

  1. Pingback: Dew Drop – May 12, 2022 (#3683) – Morning Dew by Alvin Ashcraft

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s