Script: Check Backup Coverage Across All Databases

This script returns the most recent full, differential, and transaction log backup times for every database on a SQL Server instance. It’s designed as a quick sanity check to validate backup coverage, identify gaps, and confirm maintenance jobs are running as expected across an environment.


The Script


Example Output

The result set shows one row per database with columns for the most recent full, differential, and transaction log backups. This makes it easy to immediately spot databases that are missing expected backups.

SQL Server query showing last full, differential, and log backup times for all databases

Notes

  • Safe to run in production environments
  • Databases using the SIMPLE recovery model will not have transaction log backups
  • System databases are included by design
  • Useful as a quick verification step after incidents, migrations, or maintenance changes

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *