none
dm_hadr_database_replica_states confuse RRS feed

  • Question

  • why last_sent_lsn can be lower the last_received lsn ?

    and the last harden time is much later than the  last received time ??

    and the last redone lsn is less than last_received lsn

    and what about the end_of_log_lsn and last_commit_lsn ? how is it related to last_harden_lsn??

    what's the meaning of low_water_mark_for_ghosts??

    Monday, August 12, 2019 4:14 AM

All replies

  • Hi sakurai_db,

     

    last redone lsn< last harden time< last_received lsn

     

    low_water_mark_for_ghosts: A monotonically increasing number for the database indicating a low water mark used by ghost cleanup on the primary database. If this number is not increasing over time, it implies that ghost cleanup might not happen. To decide which ghost rows to clean up, the primary replica uses the minimum value of this column for this database across all availability replicas (including the primary replica).

     

    For more details, please refer to https://docs.microsoft.com/zh-cn/sql/relational-databases/system-dynamic-management-views/sys-dm-hadr-database-replica-states-transact-sql?view=sql-server-2017

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, August 13, 2019 3:06 AM
  • Hi sakurai_db,

     

    I am glad to know that your problem has been solved In order to close this thread, please  mark useful replies as answers. By doing so, it will benefit all community members who are having this similar issue.  Your contribution is highly appreciated.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, August 14, 2019 1:11 AM
  • You said

    last redone lsn< last harden time< last_received lsn

    but in my case :

    last redone lsn +  last_received lsn = last harden time

    I still don't know what's the usage of low_water_mark_for_ghosts

    and why the format of recovery_lsn is much different from the others?

    how can it compared with the other lsn in the DMV dm_hadr_database_replica_states

    Wednesday, August 21, 2019 2:12 AM
  • anyone has the idea ?
    Thursday, August 22, 2019 3:16 PM
  • I still don't know what's the usage of low_water_mark_for_ghosts
    Sounds very clear to me.
    Do you know what Ghost Cleanup does?
    This value is used to control Ghost Cleanup task.

    and why the format of recovery_lsn is much different from the others?
    recovery_lsn is a flush LSN and it's value is not an actual LSN number.

    last redone lsn +  last_received lsn = last harden time
    Any LSN < the value of last_hardened_lsn is on disk. LSN that are >= to this value are not flushed.
    Thursday, August 22, 2019 5:03 PM
  • "recovery_lsn is a flush LSN and it's value is not an actual LSN number."

    as I know *lsn in table dm_hadr_database_replica_states  is refer to block ID instead of actual lsn

    that's why I ask why the format of recovery_lsn different from the others.

    Friday, August 23, 2019 2:30 AM
  • I couldn't say now without any test, but it certainly has some internal motive for consistency, not just for garnish.
    Friday, August 23, 2019 7:44 PM
  • what does it mean ?
    Saturday, August 24, 2019 4:10 PM