Thursday, September 6, 2018

Database "Not synchronizing / suspect" in Always On High Availability Groups

We recently configured Always On with 2 secondary servers. One secondary is synchronous commit and another with Asynchronous commit.

We are running log backup but noticed that secondary couldn’t redo the log at secondary and kept on piling the log and the drive got full.

Run below command to see what log is not clearing out
SELECT name, log_reuse_wait_desc FROM sys.databases WHERE name = 'HRDB';

Name    log_reuse_wait_desc
--------  -------------------------------
HRDB    AVAILABILITY_REPLICA

For short term add space or you might have to remove database from AlwaysOn Group and add it back. 

In the log we see “Could not redo log record” message 

Could not redo log record (40557:30625:14), for transaction ID (0:196794283), on page (1:1033), allocation unit 72058591529205760, database 'HRDB' (database ID 7). Page: LSN = (40557:30379:326), allocation unit = 72058646460891136, type = 10. Log: OpCode = 7, context 10, PrevPageLSN: (40557:30625:12). Restore from a backup of the database, or repair the database.

After troubleshooting it looks like a Bug and need to apply Cumulative patch

https://support.microsoft.com/en-us/help/3173471/fix-could-not-redo-log-record-error-and-replica-is-suspended-in-sql-se

Thanks
Satishbabu Gunukula
http://www.sqlserver-expert.com

No comments:

Post a Comment