A log sequence number (LSN) identifies a transaction-log record and locates it within the transaction log. SQL Server assigns each record an LSN made from the VLF sequence number, log block ID, and log record ID. section 9.5
Keep these distinctions clear when diagnosing transaction-log behavior:
- The LSN belongs to an individual log record, while VLFs and log blocks organize the transaction log that contains it. section 9.5
- Log truncation removes eligible VLF contents rather than the log file itself; active transactions, availability-group replication, or change data capture can keep VLFs active. section 9.5
- A transaction log cycles through truncated VLFs, but failure to grow when no reusable VLF exists can produce error 9002. section 9.5
Figure 9.4 Transaction log cycle
Use the transaction-log cycle illustration to connect LSN-bearing log records with VLF reuse and log growth. section 9.5
