Is this true?

  • Hi,

    I am reading one book on SQL Server internals.When explaining the checkpoint process it states that

    "....If the LSN of the dirty page is greater than the LSN of the page on disk,the page in the buffer pool is overwritten by the page on disk".

    Shouldn't it be the other way round ?

    Sounds confusing to me.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • I think you're right, it should be the other way round.

    I'm curious to read other opinions.

    -- Gianluca Sartori

  • Sachin Nandanwar (6/6/2011)


    Hi,

    I am reading one book on SQL Server internals.When explaining the checkpoint process it states that

    "....If the LSN of the dirty page is greater than the LSN of the page on disk,the page in the buffer pool is overwritten by the page on disk".

    Shouldn't it be the other way round ?

    Sounds confusing to me.

    If it's during recovery and it runs into the last checkpoint, I might see that... but yeah, it sounds backwards. Then again, I still need more caffeine this morning. 😀


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • The book is Microsoft Published MCTS Self-Paced Training Kit(Exam 70-432) Chapter 9, page no 213, 3rd line from the top.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • For any technical book, consider going to the publisher's Web site and checking the errata. In this case, there's confirmed, and unconfirmed.

    To submit questions or corrections for this book, go here.

    I have a similar question. On page 212, the author writes:

    If the LSN of the data page on disk is equal to or less than the LSN of the dirty page in the buffer pool...

    It seems to me that a dirty page in the buffer would have a later LSN than the page on disk; is that true?


    Peter MaloofServing Data

  • Sachin Nandanwar (6/6/2011)


    Hi,

    I am reading one book on SQL Server internals.When explaining the checkpoint process it states that

    "....If the LSN of the dirty page is greater than the LSN of the page on disk,the page in the buffer pool is overwritten by the page on disk".

    Shouldn't it be the other way round ?

    Sounds confusing to me.

    the LSN = Log Sequence Number, then to each transaction is generated one LSN !!! when happen the checkpoint process, will be verified the LSN of Disk and of Transaction Log, if LSN of disk is higher of transaction log then don't need redo, but if LSN of disk is less than transaction log then the rollback process is performed to garantee integrity


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • rfr.ferrari (6/8/2011)


    Sachin Nandanwar (6/6/2011)


    Hi,

    I am reading one book on SQL Server internals.When explaining the checkpoint process it states that

    "....If the LSN of the dirty page is greater than the LSN of the page on disk,the page in the buffer pool is overwritten by the page on disk".

    Shouldn't it be the other way round ?

    Sounds confusing to me.

    the LSN = Log Sequence Number, then to each transaction is generated one LSN !!! when happen the checkpoint process, will be verified the LSN of Disk and of Transaction Log, if LSN of disk is higher of transaction log then don't need redo, but if LSN of disk is less than transaction log then the rollback process is performed to garantee integrity

    I think you're confusing recovery with checkpoint. Are you sure?

    -- Gianluca Sartori

  • rfr.ferrari (6/8/2011)


    the LSN = Log Sequence Number, then to each transaction is generated one LSN !!!

    Correct me if I am wrong but I believe that LSN is generated for each record(DML action) and not for each transaction.

    rfr.ferrari (6/8/2011)


    when happen the checkpoint process, will be verified the LSN of Disk and of Transaction Log, if LSN of disk is higher of transaction log then don't need redo...

    I dont think that will ever happen.LSN on disk might be less or equal to LSN on the log but never greater to the LSN on the log.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • Correct me if I am wrong but I believe that LSN is generated for each record(DML action) and not for each transaction.

    DML = Data Manipulation Language, is is how we do the data manipulation, for example: insert, update, delete ...! it's recorded in transation log!!!

    on book, SQL Server 2008 Internals, that you said:

    "... SQL Server also writes log records when certain internal events happen, such as checkpoints. Each log record is labeled with a Log Sequence Number (LSN) that is guaranteed to be unique." (Chapter 4, pg 181- "Transaction Log Basics")

    I dont think that will ever happen.LSN on disk might be less or equal to LSN on the log but never greater to the LSN on the log.

    look this: Chapter 4, pg 185 - "Page LSN and Recovery"


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • Sachin Nandanwar (6/7/2011)


    The book is Microsoft Published MCTS Self-Paced Training Kit(Exam 70-432) Chapter 9, page no 213, 3rd line from the top.

    That book is covered with errors and will not be reprinted either.

    The errata page can be found here to a few of the issues that were submitted.

    The copy I got of that book actually had chapter 3 missing, but I ended up not depending on it to much after I found errors/mis-information in chapter 1.

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • rfr.ferrari (6/8/2011)


    DML = Data Manipulation Language, is is how we do the data manipulation, for example: insert, update, delete ...! it's recorded in transation log!!!

    Yes I understand that.

    But just wanted to confirm whether it is generated for each transaction or for each DML action in a transaction because in the previous post you had stated that it will be generated for each transaction.

    I dont think that will ever happen.LSN on disk might be less or equal to LSN on the log but never greater to the LSN on the log.

    look this: Chapter 4, pg 185 - "Page LSN and Recovery"[/quote]

    I could not find reference for that one because page no 185 of the book is chapter "Designing Policies".

    Also can you please give me a scenario where the LSN on the disk will be greater than LSN on the log file.Because with what I understand, no matter what LSN will always written to the log files first before to the buffer pool or to the disk.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • Shawn Melton (6/8/2011)


    Sachin Nandanwar (6/7/2011)


    The book is Microsoft Published MCTS Self-Paced Training Kit(Exam 70-432) Chapter 9, page no 213, 3rd line from the top.

    That book is covered with errors and will not be reprinted either.

    The errata page can be found here to a few of the issues that were submitted.

    The copy I got of that book actually had chapter 3 missing, but I ended up not depending on it to much after I found errors/mis-information in chapter 1.

    So which should one refer to if he/she wants to sit for the 70-432 exam ?

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • It is a good book to use for the exercises and practice exam. If you plan on taking both 70-432 and 70-450, there is not book out there from Microsoft Press for the 450 exam.

    I was given a copy of: Sybex SQL Server 2008 Admin: MCITP Certification and Beyond.

    This book covers the material for both test and is a good all-around guide to learning SQL Server 2008. It has some good exercises to go through to apply what you read.

    Other than that there is no other book dedicated to the exam itself. The other books I would recommend for just more than studying for the exam:

    SQL Server 2008 Internals and Troubleshooting (Wrox)

    SQL Server 2008 Internals (Microsoft Press)

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • Shawn Melton (6/9/2011)


    It is a good book to use for the exercises and practice exam. If you plan on taking both 70-432 and 70-450, there is not book out there from Microsoft Press for the 450 exam.

    I was given a copy of: Sybex SQL Server 2008 Admin: MCITP Certification and Beyond.

    This book covers the material for both test and is a good all-around guide to learning SQL Server 2008. It has some good exercises to go through to apply what you read.

    Other than that there is no other book dedicated to the exam itself. The other books I would recommend for just more than studying for the exam:

    SQL Server 2008 Internals and Troubleshooting (Wrox)

    SQL Server 2008 Internals (Microsoft Press)

    Thanks for the tip.I will surely try those books.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • Sachin Nandanwar (6/8/2011)


    rfr.ferrari (6/8/2011)


    DML = Data Manipulation Language, is is how we do the data manipulation, for example: insert, update, delete ...! it's recorded in transation log!!!

    Yes I understand that.

    But just wanted to confirm whether it is generated for each transaction or for each DML action in a transaction because in the previous post you had stated that it will be generated for each transaction.

    I dont think that will ever happen.LSN on disk might be less or equal to LSN on the log but never greater to the LSN on the log.

    look this: Chapter 4, pg 185 - "Page LSN and Recovery"

    I could not find reference for that one because page no 185 of the book is chapter "Designing Policies".

    Also can you please give me a scenario where the LSN on the disk will be greater than LSN on the log file.Because with what I understand, no matter what LSN will always written to the log files first before to the buffer pool or to the disk.

    hi, sachin nandawar!!!

    i'm sorry, the time that i stay without post!! I was having problems with my work!

    with relation the book - SQL Server 2008 Internals, this link: http://www.amazon.com/Microsoft%C2%AE-SQL-Server%C2%AE-2008-Internals/dp/0735626243 you can see the book that i said!!!

    this book have e-books version for download!!!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!

Viewing 15 posts - 1 through 15 (of 18 total)

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