Maintenance window FAQ

This article answers frequently asked questions about the maintenance window for Azure SQL database and SQL managed instance.

What is the maintenance window feature?

The maintenance window feature provides you with the ability to onboard Azure SQL resource to prescheduled time blocks outside of business hours. For more information, see Maintenance window schedules.

What is the default maintenance policy if I don't choose any specific window?

Maintenance events will occur during the default window 5PM to 8AM local time, Monday - Sunday.

Users work in a different time zone than the Azure data center. Which time zone is local?

Local time is determined by the location of Azure region that hosts the resource and may observe daylight saving time in accordance with local time zone definition. It isn't determined by the time zone configured on SQL database (always UTC) or managed instance.

Can I choose a specific time/day for the maintenance window?

No, you can choose between pre-scheduled weekday or weekend windows. The maintenance can happen anytime or day within the window.

What happens once I choose a maintenance window?

Configuring maintenance window is a long running asynchronous operation, similar to changing the service tier of your Azure SQL resource. The resource is available during the process, 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. For Azure SQL Managed Instance, the IP address of the managed instance will change.

What types of updates are typically performed during a maintenance window?

The maintenance event may contain updates for hardware, firmware, operating system, satellite software components, or the SQL database engine. They're typically combined into a single batch to minimize the incidence of maintenance events. In case of SQL Managed Instance, updates are combined in two batches, one focused on physical infrastructure, and another one focused on SQL engine and logical infrastructure.

How frequent the updates are?

Planned maintenance updates occur once every 35 days on average, which means customer can expect approximately one planned maintenance event per month per Azure SQL Database. In case of Azure SQL Managed Instance, customers can expect approximately two planned maintenance updates per month, but these updates can result with more than one maintenance event.

What can I expect during a maintenance event?

Maintenance event represents a period during which the updates are applied on the resource. Maintenance event happens inside the defined maintenance window. During a maintenance event, databases are fully available and accessible but some of the maintenance updates require a reconfiguration as Azure takes SQL Databases offline for a short time to apply the maintenance updates (generally a few seconds in duration), and only during the maintenance window slots selected by the customer. As in case of SQL Managed Instance one update may result with multiple maintenance events, depending on the configured maintenance window and start day of the update, the update events might complete within one week or overflow to the next week. However, planned maintenance events are never executed outside of defined maintenance windows.

How many reconfigurations can I expect during a maintenance event?

If the maintenance update requires a reconfiguration, typically one reconfiguration happens during the window. In case of SQL Managed Instance, more than one reconfiguration may happen.

Can my application become resilient to reconfiguration events?

Yes, for application resilience during Gateway maintenance, make sure your client applications use the redirect connection policy. For resilience during reconfiguration, leverage retry logic concepts.

Are there any prerequisites for configuring maintenance window?

For Azure SQL Managed Instance, additional IP addresses are needed temporarily, as in scaling vCores scenario for corresponding service tier.

In which regions are choosing a maintenance window available?

For a list of available regions, see Maintenance window availability.

I don't see my region in the available regions list, what can I do?

Contact azsqlcmfeedback@microsoft.com to share the feedback and check the plans for your region.

What is the pricing for maintenance window?

Configuring and using maintenance window is free of charge to all eligible Azure subscription types, see Maintenance window feature availability.

Would I receive a notification of the maintenance window?

You can opt in to receive notification 24 hours prior to the maintenance event, immediately before maintenance starts, and when the maintenance window is completed. The Resource health center can be checked for more information. To receive emails, advance notifications must be configured. For more information, see Advance notifications.

In which service level objectives (SLOs) can I choose a maintenance window?

Choosing a maintenance window is available in most SLOs with some exceptions, see maintenance window supported service level objectives.

If I've selected a maintenance window for a resource, and I downscale to a service level objective (SLO) where choosing a maintenance window isn't supported, what happens to my database?

In this case, the maintenance window would revert to the default option, which is 5PM to 8AM local time.

Can I cancel or postpone a planned maintenance event based on the received notification?

No. Cancelling or postponing an upcoming maintenance event isn't supported. Notifications help you to prepare for the event.

How long does it take to process a maintenance window schedule change?

You can choose a different maintenance window at any time, but changes may take up to 24 hours to take effect.

What happens when a maintenance event fails?

Although rare, failures or interruptions during a maintenance event can occur. In the event of a failure, changes are rolled back and the maintenance will be rescheduled to another time.

How do I validate that my databases are set up for maintenance window?

Under settings of the Azure resource, the maintenance tab allows you to review and change the current maintenance plan schedule. You can also review and set the maintenance window schedules for multiple resources via PowerShell, CLI, or Azure API.

Can I configure a different maintenance window for each Azure SQL database in an elastic pool?

If the database is part of an elastic pool, the maintenance window configuration of the elastic pool will be applied. Single databases outside of an elastic pool can have their own maintenance window configuration.

What are supported options to configure a maintenance window for an existing Azure SQL Database or SQL managed instance?

Azure portal, PowerShell, Azure CLI, and REST API.

Can I configure a maintenance window during database restore, recovery, copy, import, or GeoDR scenarios?

Not at this moment. The maintenance window can be configured once database is created.

I have the default maintenance window selected. Can I enable advance notifications for that maintenance?

Yes, this is currently available in Azure SQL Managed Instance. For Azure SQL Database, advance notifications can't be configured for the default maintenance window option. When choosing a maintenance window, choose an option other than System default to configure and enable advance notifications.

I'm not able to set up advance notifications for planned maintenance, will I still see planned maintenance event in Service Health dashboard?

In case of Azure SQL Database, if advance notifications aren't configured, Service Health won't show the planned maintenance events. In case of Azure SQL Managed Instance, you are able to see planned maintenance event in Service Health dashboard even if advance notifications aren't configured.

Does advance notification cover all maintenance events?

No, advance notifications focus only on planned maintenance events that can cause a service interruption.

Can I set alerts on the instance or resource group level?

No. Advance notifications are configured through Service Health alerts. Service health alerts support configuration of subscription, resource type, and region levels. Therefore, it is not possible to configure notification on the resource group level or instance level.

Can I configure alerts using PowerShell or Azure CLI?

There are no PowerShell and Azure CLI commands dedicated to configuring service health alerts. However, you can use an ARM template and leverage any standard method for deploying it by using CLI and PowerShell. Just follow the guidelines from the Quickstart: Create activity log alerts on service notifications using an ARM template.

Can I check the list of resources that will be impacted by the event that I got notified for?

Yes, you can retrieve the list of impacted resources by using Azure Resource Graph Explorer. You will receive an advance notification email that contains the notification ID and a link to the Azure Resource Graph Explorer.

The notification says "In Progress", but window has not started yet?

There is a period of 1 hour in which notifications are sent. This means that you can receive notification 25 to 24 hours before the event, 1 hour to 1 minute before the window opens, and 1 minute to 1 hour after the window is closed. Even though the notification title is "In Progress", the content of the notification contains the maintenance window start and end time and that is the moment when maintenance will begin and end.

Is there a scenario where I do not get notification about planned event?

Yes, in case that you have created a new resource, executed scaling operation, or changed maintenance window, your database or instance can end up on the machine that is already scheduled for upgrade. In this case, you will be notified only when deployment window starts and ends. For all future deployments, you will get advance notification about planned events.

Can I check if my instance has been upgraded in the last X days?

You can check this only if you have configured advanced notifications in the service health. You can use the Azure Resource Graph Explorer to retrieve a list of maintenance events, or use the Service Health overview page.