Database Boot Page and MinLSN

  • Hi,

    BOL states the following while describing the processes of a checkpoint:

  • Stores information recorded for the checkpoint in a chain of checkpoint log records. The LSN of the start of this chain is written to the database boot page.
  • One piece of information recorded in the checkpoint records is the LSN of the first log image that must be present for a successful database-wide rollback. This LSN is called the Minimum Recovery LSN (MinLSN).
  • What is the database boot page? Does log "image" in the second para mean log "record?" If not, what does it mean? And what is a database-wide rollback?

    I would highly appreciate if somebody answered these questions.

    Karim

  • This was removed by the editor as SPAM

  • Karim,

    I think you might be the smartest DBA in a few months if you keep this up

    The boot page, I suspect, is what it sounds like. A base page on which to start mapping the database. However, the DBA never uses this, can't access it, nor does it have any bearing on the operation of SQL Server. It's an internal structure.

    The first log image, is probably the log record that is needed to start the rollback. A rollback will occur for all changes that have not been committed in the log. So a transaction that is started, but not completed, will be rolled back.

  • Steve,

    First of all, I really appreciate your compliment.

    I am still somewhat confused regarding this MinLSN concept. BOL states that the MinLSN is the minimum of the LSN of the start of the checkpoint and the LSN of the oldest active transaction. Please correct me if I am wrong that the LSN of the checkpoint in this case means the LSN of the start of the latest or current checkpoint. Now let's assume the following log sequence holds:

    T1 Change1

    T2 Change1

    T3 Change1

    T1 Change2

    T1 Commit

    Checkpoint Start

    T2 Change2

    Commit T2

    T4 Change1

    Commit T3

    Checkpoint End

    Is it correct to say that the MinLSN changes as transactions commit and checkpoints are processed. What I mean is basically as follows. At the start of the checkpoint, T1 Change1 is the MinLSN since that is the start of the oldest active transaction and is the minimum. Then after T2 commits, T3 Change1 is the MinLSN since that is the start of the oldest active transaction. And then after T3 commits, Checkpoint Start is the MinLSN since that is less than the start of the oldest active transaction (T4 Change1). Please correct if my understanding is incorrect. Thanks a lot.

    Karim

  • The database boot page is always stored in page 9 of file 1, the first file in the primary file group.

    - The database boot page contains a broad variety of data about the database itself.

    - Here you can find the internal database version, the compatibility level, the database name and the date of the last log backup.

    - To look into this page, we can use the same DBCC PAGE command we have used with the other page types.

    DBCC TRACEON(3604);

    DBCC PAGE(0,1,9,3);

    ------------------------

    The first log image is nothing but the minimum recovery LSN (MinLSN), which needs to be present for the successful database wide rollback.

    The MinLSN can be either the LSN of the start of the checkpoint or the LSN of the oldest active transaction or the LSN of the oldest transaction marked for the Replication which has not been yet replicated to all subscribers.

    MinLSN is recorded in the boot page, so that SQL Server can find the last checkpoint in the log for the recovery.

  • Viewing 5 posts - 1 through 4 (of 4 total)

    You must be logged in to reply to this topic. Login to reply