log file of primary replica database in AG is full

  • Good Morning Experts,

    The log file of primary replica database in AG is full and it cannot be shrunk. Could you please let me know how to fix this?

  • coolchaitu - Wednesday, July 18, 2018 6:45 AM

    Good Morning Experts,

    The log file of primary replica database in AG is full and it cannot be shrunk. Could you please let me know how to fix this?

    I'm going to make the assumption that you are performing log backups and you haven't been able to free up any space on the drive that the log file is on. In which case, what is the entry under 'log_reuse_wait_desc' when you select from sys.databases?

  • BrainDonor - Wednesday, July 18, 2018 7:23 AM

    coolchaitu - Wednesday, July 18, 2018 6:45 AM

    Good Morning Experts,

    The log file of primary replica database in AG is full and it cannot be shrunk. Could you please let me know how to fix this?

    I'm going to make the assumption that you are performing log backups and you haven't been able to free up any space on the drive that the log file is on. In which case, what is the entry under 'log_reuse_wait_desc' when you select from sys.databases?

    It shows "AVAILABILITY REPLICA"

  • coolchaitu - Wednesday, July 18, 2018 7:46 AM

    It shows "AVAILABILITY REPLICA"

    So, does the dashboard show any issues? 
    Also, have a look at the synchronization_state and synchronization_health_desc of sys.dm_hadr_database_replica_states. In theory everything should be 'HEALTHY' under the description column.

  • Have you done a dbcc sqlperf(logspace)?  Does this confirm that you do indeed have space inside your log? 

    Is it your expectation that the log will shrink when the space inside of it is cleared after a log backup completes and it truncates that space used?  If so, that is not the case, the physical file will not auto-shrink, altho space inside of it will be become available.

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

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