You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This topic describes how to configure the **recovery interval** server configuration option in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The **recovery interval** option defines an upper limit on the time recovering a database should take. The [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] uses the value specified for this option to determine approximately how often to issue [automatic checkpoints](../../relational-databases/logs/database-checkpoints-sql-server.md) on a given database.
24
-
25
-
The default recovery-interval value is 0, which allows the [!INCLUDE[ssDE](../../includes/ssde-md.md)] 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.
26
-
27
-
**In This Topic**
28
-
29
-
-**Before you begin:**
30
-
31
-
[Limitations and Restrictions](#Restrictions)
32
-
33
-
[Recommendations](#Recommendations)
34
-
35
-
[Security](#Security)
36
-
37
-
-**To Configure the recovery interval Server Configuration Option, using:**
38
-
39
-
[SQL Server Management Studio](#SSMSProcedure)
40
-
41
-
[Transact-SQL](#TsqlProcedure)
42
-
43
-
-**Follow Up:**[After you configure the recovery interval option](#FollowUp)
44
-
45
-
## <aname="BeforeYouBegin"></a> Before You Begin
46
-
47
-
### <aname="Restrictions"></a> Limitations and Restrictions
48
-
49
-
- 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)](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md).
50
-
51
-
### <aname="Recommendations"></a> Recommendations
52
-
53
-
- This option is an advanced option and should be changed only by an experienced database administrator or certified [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] professional.
54
-
55
-
- 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.
56
-
57
-
- If you use **sp_configure** to change the value of the **recovery interval** option to more than 60 (minutes), specify RECONFIGURE WITH OVERRIDE. WITH OVERRIDE disables configuration value checking (for values that are not valid or are nonrecommended values).
58
-
59
-
### <aname="Security"></a> Security
60
-
61
-
#### <aname="Permissions"></a> Permissions
62
-
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.
63
-
64
-
## <aname="SSMSProcedure"></a> Using SQL Server Management Studio
65
-
**To set the recovery interval**
66
-
67
-
1. In Object Explorer, right-click server instance and select **Properties**.
68
-
69
-
2. Click the **Database settings** node.
70
-
71
-
3. 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 [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] should spend recovering each database at startup. The default is 0, indicating automatic configuration by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. In practice, this means a recovery time of less than one minute and a checkpoint approximately every one minute for active databases.
72
-
73
-
## <aname="TsqlProcedure"></a> Using Transact-SQL
74
-
75
-
#### To set the recovery interval
76
-
77
-
1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)].
78
-
79
-
2. From the Standard bar, click **New Query**.
80
-
81
-
3. Copy and paste the following example into the query window and click **Execute**. This example shows how to use [sp_configure](../../relational-databases/system-stored-procedures/sp-configure-transact-sql.md) to set the value of the `recovery interval` option to `3` minutes.
82
-
83
-
```sql
84
-
USE AdventureWorks2012 ;
85
-
GO
86
-
EXEC sp_configure 'show advanced options', 1;
87
-
GO
88
-
RECONFIGURE ;
89
-
GO
90
-
EXEC sp_configure 'recovery interval', 3 ;
91
-
GO
92
-
RECONFIGURE;
93
-
GO
94
-
95
-
```
96
-
97
-
For more information, see [Server Configuration Options (SQL Server)](../../database-engine/configure-windows/server-configuration-options-sql-server.md).
98
-
99
-
## <aname="FollowUp"></a> Follow Up: After you configure the recovery interval option
100
-
The setting takes effect immediately without restarting the server.
101
-
102
-
## See Also
103
-
[Change the Target Recovery Time of a Database (SQL Server)](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md)
This article describes how to configure the **recovery interval (min)** server configuration option in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The **recovery interval (min)** option defines an upper limit on the time recovering a database should take. The [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] uses the value specified for this option to determine approximately how often to issue [automatic checkpoints](../../relational-databases/logs/database-checkpoints-sql-server.md) on a given database.
26
+
27
+
The default recovery-interval value is 0, which allows the [!INCLUDE[ssDE](../../includes/ssde-md.md)] 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.
28
+
29
+
The setting takes effect immediately without restarting the server.
30
+
31
+
## Limitations and restrictions
32
+
33
+
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)](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md).
34
+
35
+
## Recommendations
36
+
37
+
This option is an advanced option and should be changed only by an experienced database administrator or certified [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] professional.
38
+
39
+
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.
40
+
41
+
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).
42
+
43
+
## Permissions
44
+
45
+
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.
46
+
47
+
## Use SQL Server Management Studio
48
+
49
+
1. In Object Explorer, right-click server instance and select **Properties**.
50
+
51
+
1. Select the **Database settings** node.
52
+
53
+
1. 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 [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] should spend recovering each database at startup. The default is 0, indicating automatic configuration by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. In practice, this means a recovery time of less than one minute and a checkpoint approximately every one minute for active databases.
54
+
55
+
## Use Transact-SQL
56
+
57
+
1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)].
58
+
59
+
1. From the Standard bar, select **New Query**.
60
+
61
+
1. Copy and paste the following example into the query window and select **Execute**. This example shows how to use [sp_configure](../../relational-databases/system-stored-procedures/sp-configure-transact-sql.md) to set the value of the `recovery interval (min)` option to `3` minutes.
62
+
63
+
```sql
64
+
USE AdventureWorks2019;
65
+
GO
66
+
EXEC sp_configure 'show advanced options', 1;
67
+
GO
68
+
RECONFIGURE;
69
+
GO
70
+
EXEC sp_configure 'recovery interval (min)', 3;
71
+
GO
72
+
RECONFIGURE;
73
+
GO
74
+
```
75
+
76
+
For more information, see [Server Configuration Options (SQL Server)](../../database-engine/configure-windows/server-configuration-options-sql-server.md).
77
+
78
+
## See also
79
+
80
+
-[Change the Target Recovery Time of a Database (SQL Server)](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md)
0 commit comments