// sql server · checkpoints & recovery

TARGET_RECOVERY_TIME

Target crash-recovery time for a database, which switches it to indirect checkpoints.

Default
60 SECONDS
Range
0 to 2147483647 SECONDS or MINUTES
Restart needed
No
Default checked on
SQL Server 2025

What it does

With a value above 0, the database uses indirect checkpoints: a background writer keeps the number of dirty pages low enough to recover within the target, which spreads I/O instead of bursting. 0 falls back to automatic checkpoints driven by the instance's recovery interval.

Default value

60 SECONDS. 60 seconds for databases created on SQL Server 2016 and later, inherited from model. Databases created on older versions and upgraded or attached keep 0.

Check the current value

SELECT name, target_recovery_time_in_seconds
FROM sys.databases
WHERE name = DB_NAME();

Change it

ALTER DATABASE CURRENT SET TARGET_RECOVERY_TIME = 60 SECONDS;

No restart; takes effect immediately.

When to change it

Set 60 seconds on databases upgraded from SQL Server 2014 or older that still show 0.

What can go wrong

Very low targets increase background write I/O.

The closest setting on other engines

EngineSettingDefaultRestart
SQL Server TARGET_RECOVERY_TIME this page 60 SECONDS No
PostgreSQL max_wal_size 1GB No
MySQL innodb_redo_log_capacity 100MB No
Oracle fast_start_mttr_target 0 No
SQLite wal_autocheckpoint 1000 pages No

Questions about TARGET_RECOVERY_TIME

What is the default value of TARGET_RECOVERY_TIME in SQL Server?

60 SECONDS. 60 seconds for databases created on SQL Server 2016 and later, inherited from model. Databases created on older versions and upgraded or attached keep 0.

Does changing TARGET_RECOVERY_TIME require a restart?

No. No restart; takes effect immediately.

When should I change TARGET_RECOVERY_TIME?

Set 60 seconds on databases upgraded from SQL Server 2014 or older that still show 0.

Back to all SQL Server settings, or check the SQL Server manual for every option.

// one client for every engine

Check TARGET_RECOVERY_TIME on your own server

SQLly runs the query above against SQL Server and the other engines in this reference, from one desktop app on macOS, Windows and Linux.