Take the 2-minute tour ×

I am learning to use CDC in SQL server 2008, I have read that LSN is always incremented and is based upon timestamp, so why LSN is required, if it is calculated from timestamp which can be used as increamental sequence id for changes made. I am sure that there will be some other purpose as well of lsn.

share|improve this question
Have a look at my answer here for further reading. –  Jon Seigel Mar 25 '13 at 13:29
It was helpful, thanks! –  jaczjill Mar 25 '13 at 13:57
add comment

1 Answer

up vote 10 down vote accepted

A date/time value is generally not considered to be unique enough. No matter how fine you define it, it is possible to have 2 actions occurring for the same datetime value.

Prior to SQL Server 2008, the most accurate value was a rounded 3.33 milliseconds with datetime which is an eternity really. datetime2 resolves to 100 nanoseconds which isn't accurate enough either.

From another view, time is is a real number. No matter how accurately you store a time, there is always some rounding to your level of resolution (In this case, 3.33 ms or 100 ns)

Using LSN (which is numeric (25,0)) gives a strictly monotonically increasing unambiguous whole number value. It is a natural number

share|improve this answer
Thats great! Thank you very much! –  jaczjill Mar 25 '13 at 10:32
Most RDBMSes do the same - Oracle uses a system change number (SCN), for example. –  Phil Mar 25 '13 at 12:14
add comment

Your Answer


