Configure the recovery interval (min) (server configuration option)
Applies to: SQL Server
This article describes how to configure the recovery interval (min) server configuration option in SQL Server by using SQL Server Management Studio or Transact-SQL. The recovery interval (min) option defines an upper limit on the time recovering a database should take. The SQL Server Database Engine uses the value specified for this option to determine approximately how often to issue automatic checkpoints on a given database.
The default recovery-interval value is 0, which allows the Database Engine to automatically configure the recovery interval. Typically, the default recovery interval results in automatic checkpoints occurring approximately once a minute for active databases and a recovery time of less than one minute. Higher values indicate the approximate maximum recovery time, in minutes. For example, setting the recovery interval to 3 indicates a maximum recovery time of approximately three minutes.
The setting takes effect immediately without restarting the server.
Limitations and restrictions
The recovery interval affects only databases that use the default target recovery time (0). To override the server recovery interval on a database, configure a non-default target recovery time on the database. For more information, see Change the Target Recovery Time of a Database (SQL Server).
This option is an advanced option and should be changed only by an experienced database administrator or certified SQL Server professional.
Typically, we recommend that you keep the recovery interval at 0, unless you experience performance problems. If you decide to increase the recovery-interval setting, we recommend increasing it gradually by small increments and evaluating the effect of each incremental increase on recovery performance.
If you use
sp_configure to change the value of the recovery interval (min) option to more than 60 (minutes), specify
RECONFIGURE WITH OVERRIDE.
WITH OVERRIDE disables configuration value checking (for values that aren't valid or are nonrecommended values).
Execute permissions on
sp_configure with no parameters or with only the first parameter are granted to all users by default. To execute
sp_configure with both parameters to change a configuration option or to run the
RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. The ALTER SETTINGS permission is implicitly held by the sysadmin and serveradmin fixed server roles.
Use SQL Server Management Studio
In Object Explorer, right-click server instance and select Properties.
Select the Database settings node.
Under Recovery, in the Recovery interval (minutes) box, type or select a value from 0 through 32767 to set the maximum amount of time, in minutes, that SQL Server should spend recovering each database at startup. The default is 0, indicating automatic configuration by SQL Server. In practice, this means a recovery time of less than one minute and a checkpoint approximately every one minute for active databases.
Connect to the Database Engine.
From the Standard bar, select New Query.
Copy and paste the following example into the query window and select Execute. This example shows how to use sp_configure to set the value of the
recovery interval (min)option to
EXEC sp_configure 'show advanced options', 1;
EXEC sp_configure 'recovery interval (min)', 3;
For more information, see Server Configuration Options (SQL Server).
- Change the Target Recovery Time of a Database (SQL Server)
- Database Checkpoints (SQL Server)
- Server Configuration Options (SQL Server)