Configure maintenance window in Azure SQL Database

Applies to: Azure SQL Database

You can configure the maintenance window for a database or elastic pool in Azure SQL Database, or anytime after a resource is created.

  • The System default maintenance window is 5PM to 8AM daily (local time of the Azure region the resource is located) to avoid peak business hours interruptions.
  • If the System default maintenance window is not the best time, select one of the other available maintenance windows.

The ability to change to a different maintenance window is not available for every service level or in every region. For details on feature availability, see Maintenance window availability.

Important

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.

Configure maintenance window during database creation

To configure the maintenance window when you create a database or elastic pool, set the desired Maintenance window on the Additional settings page.

Set the maintenance window while creating a single database or elastic pool

For step-by-step information on creating a new database or pool, see Create an Azure SQL Database single database.

Screenshot from the Azure portal showing the Create SQL Database wizard. The additional settings tab is open, and the Maintenance window drop down is boxed in red.

Configure maintenance window for existing databases

When applying a maintenance window selection to a database, a brief reconfiguration (several seconds) might be experienced in some cases as Azure applies the required changes.

The following steps set the maintenance window on an existing database or elastic pool using the Azure portal:

Set the maintenance window for an existing database or elastic pool

  1. Navigate to the SQL database or elastic pool you want to set the maintenance window for.

  2. In the Settings menu select Maintenance, then select the desired maintenance window.

    Screenshot from the Azure portal of the SQL database Maintenance page.

Cleanup resources

If you create Azure SQL resources as part of this tutorial, be sure to delete unneeded resources after you're finished with them to avoid unnecessary charges.

  1. Navigate to the SQL database or elastic pool you no longer need.
  2. On the Overview menu, select the option to delete the resource.