Skip to main content
3 of 3
Tweaked grammar and formatting
András Váczi
  • 31.6k
  • 13
  • 101
  • 149

Log size is different between primary and secondary node with log_since_last_log_backup_mb

We get log backups from the secondary node. But now I see that log_since_last_log_backup_mb in sys.dm_db_log_stats returns null for databases which are in Availability groups, so Ola Hallengren's log backup procedure with

@LogSizeSinceLastLogBackup = 25,@TimeSinceLastLogBackup = 21000 

limitations works on those databases. The backup process is currently working on the secondary node.

But I could not understand why it returns null? Have you encountered such a situation?

The following pictures show result of log size since last log backup on the primary and secondary nodes.

Primary Node

enter image description here

Secondary Node

enter image description here