Tag: Transaction Logs
SQL Server transaction log concepts, monitoring, and troubleshooting, including log growth, space usage, backups, and recovery behavior.
-
Track Database Growth Events Over Time in SQL Server
SQL Server’s default trace captures database and log file growth events, but it’s short-lived. Once the trace rolls over or the instance restarts, that history is gone. If you want to understand growth patterns over time, react less to disk alerts, and stop guessing which databases are mis-sized, you need to store those events somewhere.…
-
Deleting Rows in Batches in SQL Server
Deleting large volumes of data from a SQL Server table looks simple, but it can cause real problems if done carelessly. A single large DELETE can: When you’re cleaning up historical data or running routine maintenance, deleting rows in batches is usually the safest and most predictable approach. This post shows a simple, production-safe pattern…
-
Show Database Growth Events in SQL Server
Database file growth events are easy to ignore until they become a problem. When a data or log file autogrows, SQL Server pauses briefly to extend the file. If this happens frequently, it can introduce latency, increase I/O pressure, and in some cases trigger disk space incidents. For DBAs, understanding when files grow and which…
-
How to Check Transaction Log Space Usage in SQL Server
Monitoring transaction log space usage is a fundamental DBA task. If a log file runs out of space, transactions can fail, applications can stop, and in the worst cases databases can be taken offline. This post shows two practical ways to check log space usage in SQL Server, starting with a built-in command and then…
-
Applying Data Retention Safely in SQL Server
Data retention in SQL Server usually means deleting old data in a controlled and repeatable way. That might be driven by compliance requirements, table growth that’s starting to hurt performance, SQL Server Express size limits, or simply keeping log and audit tables under control. Whether this is a one-off cleanup or a permanent maintenance task,…
-
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…