Typically as developers, we don’t care about these values. But when we do want to dig into the transaction log, we can do so with
sys.fn_dblogwhich takes two optional parameters. These parameters are LSN values which limit the results of
sys.fn_dblog. But the weird thing is that
sys.fn_dblogis a function whose LSN parameters are NVARCHAR(25).
sys.fn_dblogdoesn’t expect binary(10) values for its LSN parameters, it wants the LSN values as a formatted string, something like:
Never fear, though: Michael’s got us covered. Click through for a conversion function.