Convert an LSN from Hex to Decimal

Log Sequence Numbers (LSNs) can be displayed and consumed in several formats. This post shows how to quickly and easily convert between the “typical” hexidecimal format, and the equivalent decimal format. Hexidecimal format LSNs appear…

Using DBCC PAGE to view Row Details

SQL Server stores database data on 8KB pages. The details around looking at page contents are a pretty advanced subject. However, understanding some brief details about the page structure via the output of DBCC PAGE…

CHECKPOINT and Simple Recovery Model

This article shows how checkpoint and simple recovery model works. For databases configured with the “simple” recovery model, it’s important to understand how checkpoints work1 under simple recovery model to avoid running out of log…

Checkpoint Tracking via Extended Events

Checkpoint tracking can be useful when you’re attempting to understand when automatic checkpoints are occurring. Extended Events in SQL Server offer a powerful way to track many events in SQL Server as they happen. This…

Reading the Ring Buffer in Extended Events

The much-maligned ring buffer target in Extended Events offers a simple, reliable place to store transient events. While it’s pretty easy to use the “Live Data” view in SQL Server Management Studio to view events…

What SQL Text is that Session Running?

Use the code below if you have a long, complicated, stored procedure or piece of dynamic SQL running on a server, and you’d like to see exactly which piece of SQL Text, or code, is…