Configure maintenance window

Applies to: Azure SQL Database Azure SQL Managed Instance

Configure the maintenance window for an Azure SQL database, elastic pool, or Azure SQL Managed Instance database during resource creation, 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, elastic pool, or managed instance, 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.

Create database additional settings tab

Set the maintenance window while creating a managed instance

For step-by-step information on creating a new managed instance, see Create an Azure SQL Managed Instance.

Create managed instance additional settings tab

Configure maintenance window for existing databases

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

The following steps set the maintenance window on an existing database, elastic pool, or managed instance 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.

    SQL database Maintenance page

Set the maintenance window for an existing managed instance

  1. Navigate to the managed instance you want to set the maintenance window for.

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

    SQL managed instance Maintenance page

Cleanup resources

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.

Next steps