SQL Interview: 102 Checkpoint writes
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Administration Level: Advanced
Question:
When checkpoint writes occur, is only committed data written, or is uncommitted data written?
If only committed data, explain why.
If both, explain why.
Answer:
Checkpoint is a background process that:
- Flushes dirty pages (pages in memory that have been modified since they were read from disk) to disk.
- Records a log sequence number (LSN) in the transaction log that marks the point at which the database is known to be consistent on disk.
This means that SQL Server doesn’t flush only committed transactions — it flushes all dirty pages, whether the transactions that modified them are committed or not.
2025-12-28