liveBook · Manning

Retention policy

As explained in 100 SQL Server Mistakes and How to Avoid Them

A data retention policy specifies how long stored data must be preserved before it may be deleted or archived.

A retention policy specifies how long stored data must remain available before deletion or archiving. Treating it as a paperwork detail can turn ordinary growth into a storage crisis. section 9.6

Mistake: sizing storage without retention

MarketingArchive receives 5 GB of data daily and retains it for three years. A database that appears to have 50 GB free can grow to about 1.78 TB after one year; adding TempDB, the transaction log, and safety headroom may require roughly 3.2 TB. If the SAN has only 2 TB available, the result can be a business dispute and extended downtime while new capacity is installed. section 9.6

Use the policy as an operational input:

  • Calculate required data-file capacity from the daily ingestion rate and retention period. section 9.6
  • Include TempDB, the transaction log, unexpected growth, and existing SAN commitments in the estimate. section 9.6
  • Apply an appropriate retention policy to backups, and keep backups air-gapped or on immutable storage; encrypt them against cyberattacks. section 12.12
Figure 9.5 Linear growth pattern

Use the linear-growth figure to visualize how a steady daily intake accumulates against the retention horizon. section 9.6

How 100 SQL Server Mistakes and How to Avoid Them covers it

How deep it goes
Calculates linear data growth and associated storage needs, but stops short of defining deletion or archival procedures.
Examples
Illustrates retention through MarketingArchive, 5 GB daily ingestion, three-year retention, and air-gapped or immutable backups.
What you can do after
Evaluate storage forecasts and backup safeguards using retention duration, growth rate, headroom, and protection requirements.
How it connects
Connects retention policy with capacity planning, data growth, TempDB, transaction logs, backups, and ransomware protection.

Also explained in

Compare how 10 books explain retention policy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of 100 SQL Server Mistakes and How to Avoid Them. The section links point to the parts of the book it draws on.