問題描述
日志序列號是什么意思?我知道它是二進制類型和 10 字節長,它對應于事務在 DB 中發生的時間.但這是一個以某種有效二進制格式存儲的高精度日期時間值,還是日期時間和其他東西的函數(例如,在同一毫秒內發生的事務序列號).我做了很多搜索,但找不到一個好的答案.
What is the meaning of Log Sequence Number? I know that it is of type binary and 10bytes long and it corresponds to the time the transaction happen in DB. But is this a high precision date-time value that is stored in some efficient binary format or is this a function of date-time and something else (for example the serial number of transactions that happen at the same milli second). I did a lot of searching but couldn't find a good answer to this.
任何人都可以用一個公式或函數來解釋,該公式或函數用于從日期-時間或其他任何東西推導出 LSN.
Can any one explain with a formula or function that is used to derive the LSN from date-time or anything.
推薦答案
SQL Server 中的每條記錄事務日志是唯一標識的通過日志序列號 (LSN).LSN排序使得如果 LSN2 是大于 LSN1,變化由引用的日志記錄描述到由 LSN2 發生更改后由日志記錄 LSN 描述.
Every record in the SQL Server transaction log is uniquely identified by a log sequence number (LSN). LSNs are ordered such that if LSN2 is greater than LSN1, the change described by the log record referred to by LSN2 occurred after the change described by the log record LSN.
來自這里.
您不應該關心這些是如何生成的.
You should not be concerned with how these are generated.
這篇關于LSN 在 SQL Server 中是什么意思?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!