This script returns transaction log size and usage information for all databases on the instance. It shows total log size, used log space, percentage used, and recovery model.
This is commonly used during log growth incidents, backup troubleshooting, or when validating log management across an environment.
The Script
Example Output
The result set shows one row per database, including recovery model, total log size in MB, used log space in MB, and percentage used.
Databases with the highest log usage percentage appear first, making it easy to identify potential log growth risks.

Notes
- High usage percentage may indicate missing log backups in FULL recovery model
- SIMPLE recovery databases will not require log backups
- Persistent high usage may indicate long-running transactions
- Useful before investigating log growth or autogrowth events
Leave a Reply