Pcornel
Browse topics
Options
Recent
Favorites
Databases · Technical reference

SQL Server Recovery Models

Direct answer

SQL Server recovery models: Simple (log truncates at checkpoint, no PITR), Full (log backups needed, PITR possible), Bulk-logged (minimal logging for bulk operations).

When to use this

Use it when the transaction log grows or when point-in-time restore is required.

First 30 seconds

1. SELECT name,recovery_model_desc,log_reuse_wait_desc FROM sys.databases;.

2. Full → log backups scheduled?

3. Log size: DBCC SQLPERF(LOGSPACE).

4. Fix the wait reason (LOG_BACKUP, ACTIVE_TRANSACTION, AVAILABILITY_REPLICA).

5. Shrink only after fixing the cause.

Operational verification

recovery model → log truncation rule → backups → restore options

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
MariaDB / MySQL / PostgreSQL / Microsoft SQL Server concepts
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformMariaDB / MySQL / PostgreSQL / Microsoft SQL Server concepts
Scope / prerequisiteUse it when the transaction log grows or when point-in-time restore is required.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Confirm log backups run on schedule for FULL databases. Restore a full plus log backups to a test server to a chosen time.

Step 2 Common failures Narrow the fault

FULL recovery without log backups fills the disk. Switching to SIMPLE breaks the log backup chain. A long open transaction keeps the log from truncating.

Key points

Full recovery without log backups makes the log grow until the disk fills. Check log_reuse_wait_desc for why the log cannot truncate.

Key checks
  • SELECT name,recovery_model_desc,log_reuse_wait_desc FROM sys.databases; — first check for this topic
  • psql -c "SELECT now(), version();" — PostgreSQL reachable and version
  • mysql -e "SELECT NOW(), VERSION();" — MariaDB/MySQL reachable and version
  • sqlcmd -S <server> -Q "SELECT @@VERSION" — SQL Server reachable and version
ReferenceWhat it is1 section · depth on demand

How it works

SQL Server writes every change to the transaction log. In FULL, log space is reused only after it is backed up. log_reuse_wait_desc shows what currently prevents reuse, such as LOG_BACKUP or ACTIVE_TRANSACTION.

ReferenceImportant terms & boundaries3 sections · depth on demand

Choosing a model

ModelLog backupsPoint-in-time restoreLog growth
SIMPLENoNo (only to last full/diff)Truncates at checkpoint
FULLRequiredYesGrows until log backup
BULK_LOGGEDRequiredLimited during bulk opsSmaller for bulk loads
SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases;

A full transaction log in FULL model usually means log backups are not running (log_reuse_wait_desc = LOG_BACKUP).

In depth

Why the log does not shrink

In FULL and BULK_LOGGED, inactive log space is reused only after a log backup; in SIMPLE, after a checkpoint. Something else can also hold the log — SQL Server reports what:

SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases;
SELECT * FROM sys.dm_db_log_space_usage;                   -- in the database
log_reuse_wait_descMeaningAction
LOG_BACKUPWaiting for a log backupSchedule log backups (FULL model)
ACTIVE_TRANSACTIONLong-running open transactionFind it: DBCC OPENTRAN
AVAILABILITY_REPLICAA secondary has not hardened/redone the logCheck AG synchronization
REPLICATIONTransactional replication/CDC not read yetCheck Log Reader Agent
CHECKPOINTWaiting for a checkpointUsually transient
NOTHINGSpace is reusableShrink only if really needed

Backup chain for point-in-time restore

Full (weekly) → differential (daily) → log backups (every 5–15 min). Restore: the full WITH NORECOVERY, the latest differential WITH NORECOVERY, then each log backup in order, the last one WITH STOPAT = '2026-11-27T10:42:00', RECOVERY.

BACKUP LOG shop TO URL = 'https://…/shop_20261127_1045.trn' WITH COMPRESSION, CHECKSUM;

Switching FULL → SIMPLE → FULL breaks the log chain; take a full or differential backup immediately after switching back. A COPY_ONLY full backup does not disturb the differential base.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • FULL recovery model without log backups (log grows).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
sql server recovery modelssql server recovery modeltransaction log full
Confirmation

Confirm action

Continue?