Availability Group Database Not Synchronizing / Recovery Pending State

Availability Group Database Not Synchronizing / Recovery Pending State:


When SQL Server is unable to access the database log files of your Availability Group Database/Databases, this error message appears. This problem can occur on both the Primary and Secondary Replicas.

Issue happened on Primary Replica:

You can check the SQL Server error log on Primary Replicas to see if the database log file is available or not.
If the log file is inaccessible, the error number 9001 is also reported.

We can fix the problem on Primary Replicas by doing the following:

  1. Ascertain that the database files are accessible.
  2. Attempt to SUSPEND and RESUME the Availability Group database; however, this may not resolve the issue.
  3. Set the database ONLINE using the ALTER command below ALTER database DBNAME set ONLINE
  4. Wait a few minutes and verify the database status; it should now be GREEN and HEALTHY.

If the Issue Reappears on the Secondary Replica:

If the database log file is available or inaccessible, look for error messages in the SQL Server error log. If the log file is inaccessible, the error number 9001 is logged.

To fix the problem on secondary replicas, follow these steps:

  1. Ascertain that the database files are accessible.
  2. Attempt to SUSPEND and RESUME the Availability Group database; however, this may not resolve the issue.
  3. Since the secondary replica is in the process of being restored, we can’t use the Alter command to bring the Availability Group database online. However, the db status on the sys.databases reports is ONLINE.
  4. We need to RESTART the secondary replica SQL Instance since it will start the recovery process for all databases. It will also assist in successfully recovering the faulty Availability Group database and synchronizing the database with the primary replica.

Author: Sri

Hello Friends, This blog is to help the IT professionals who want to become a professional SQL Server DBA but don't know how and from where to start with. So, I am going to share my experiences and my learning in this blog. Will talk about what are the pre-requisite skills required to become a Professional SQL Server DBA, how much time it takes to be a good DBA and what are the additional skill sets are required to become a good DBA. Apart from that I will also post real time sql server settings on server level and database level, Configuring High Availability. Also will share the Client requirements with real time setups if possible I will provide you with screenshots.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.