This article answers frequently asked questions about the maintenance window for Azure SQL Database. For a maintenance window FAQ for Azure SQL Managed Instance, see Maintenance window FAQ for Azure SQL Managed Instance.
The maintenance window feature provides you with the ability limit Azure SQL Database maintenance outages to a prescheduled time block, outside your business hours. For more information, see Maintenance window schedules.
Maintenance events occur during the default window 5PM to 8AM local time, Monday - Sunday.
Local time is determined by the location of Azure region that hosts the resource and observes daylight saving time in accordance with local time zone definition. It isn't determined by the time zone configured on SQL database (always UTC).
For a list of available regions, see Maintenance window availability.
Open a Support Ticket to share the feedback and check the plans for your region.
Configuring and using maintenance window is free of charge to all eligible Azure subscription types, see Maintenance window feature availability.
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.
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.
You can choose a different maintenance window at any time, but changes might take up to 24 hours to take effect.
No, advance notifications focus only on planned maintenance events that can cause a service interruption.
No, you can choose between prescheduled weekday or weekend windows. The maintenance can happen anytime or day within the window.
No. Cancelling or postponing an upcoming maintenance event isn't supported. Notifications help you to prepare for the event.
If the database is part of an elastic pool, the maintenance window configuration of the elastic pool is applied. Single databases outside of an elastic pool can have their own maintenance window configuration.
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?
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.
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.
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.
Configuring maintenance window is a long running asynchronous operation, similar to changing the service tier of your Azure SQL Database. 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 during long-running transactions. To minimize the impact of the reconfiguration, you should perform the operation outside of the peak hours.
The maintenance event can 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.
Azure SQL Database service regularly performs maintenance updates for security, compliance, stability, and performance. You might see two or more updates per month. Maintenance can be more frequent in the default maintenance window. To minimize update frequency, choose a nondefault maintenance window.
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) during the maintenance window selected by the customer.
If the maintenance update requires a reconfiguration, typically one to two reconfigurations happen during the window.
Yes, for application resilience during Gateway maintenance, make sure your client applications use the redirect connection policy. For resilience during reconfiguration, applications should follow retry logic concepts.
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.
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.
I'm not able to set up advance notifications for planned maintenance, will I still see planned maintenance event in Service Health dashboard?
For Azure SQL Database, if advance notifications aren't configured, Service Health won't show the planned maintenance events.
There's 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.
Yes, in case that you have created a new resource, executed scaling operation, or changed maintenance window, your database can end up on the machine that is already scheduled for upgrade. In this case, you are notified only when deployment window starts and ends. For all future deployments, you will get advance notification about planned events.
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.
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.