Reposted from: https://www.sqlservercentral.com/forums/topic/secondary-database-replica-in-reverting-inrecovery-long-time


One of my AG secondary replica has been in reverting/in recovery for more than a day. The database size is about 700GB. I was trying to suspend/remove the database from the AG so I could apply the differential and log backups to get it up-to-date, but SQL Server wouldn't allow me to do so because it's running a HADR_DB_COMMAND that is blocking me. Is there a way to bypass this? Or, would it be best to allow SQL Server to do its thing?

Thank you.

  • 3
    I am running into the same issue and its best to have it recover by its own. Mine took 40 mins for 3 TB database. I have opened a case with MS and since I am running on 2014, there are limited things that I can check. Was the db having large transactions running when the failover happened ? Also check indirect checkpoint to see if that helps recover faster. – Kin Shah Sep 18 '19 at 13:57
  • 2
    Have you checked your VLFs – LowlyDBA - John M Sep 18 '19 at 14:27
  • 2
    Are you seeing messages every couple of minutes in the error log about a DB recovery in progress and % complete? – Tony Hinkle Sep 18 '19 at 14:58
  • There are 64 VLFs on that database. – dajonx Sep 18 '19 at 15:59
  • No, there are no messages about progress. The only way I can tell is by looking at Perfmon Database Replica: Log remaining for undo decreasing. – dajonx Sep 18 '19 at 16:00

I waited it out for about two days and the replication is back up.

I guess it's best to let SQL Server do it and to monitor the counters pertaining to the undo (SQLSERVER:Database Replica -> Log Remaining For Undo and Total Log Requiring Undo).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.