Availability Groups & Is Preferred Backup Replica

  • I have a 2012 SP3 CU9 instance hosting several single-replica* AlwaysOn Availability Groups, and native log backups aren't being taken for any of the databases. The only way I can take log backups is by removing the databases from the AG.

    - In the AG properties, the Backup Preference is set to Primary
    - In the output text file for the SQL Agent transaction log backup job (Ola Hallengren)  I get this:

       Availability group role: PRIMARY
       Availability group backup preference: PRIMARY
       Is preferred backup replica: No

    - When I check sys.fn_hadr_backup_is_preferred_replica , sure enough they are not the preferred replica. But there are no other replicas!

    Recreating the AGs from scratch didn't help. What am I missing? Thanks very much in advance.

    * inherited.

  • Beatrix Kiddo - Monday, September 25, 2017 7:04 AM

    I have a 2012 SP3 CU9 instance hosting several single-replica* AlwaysOn Availability Groups, and native log backups aren't being taken for any of the databases. The only way I can take log backups is by removing the databases from the AG.

    - In the AG properties, the Backup Preference is set to Primary
    - In the output text file for the SQL Agent transaction log backup job (Ola Hallengren)  I get this:

       Availability group role: PRIMARY
       Availability group backup preference: PRIMARY
       Is preferred backup replica: No

    - When I check sys.fn_hadr_backup_is_preferred_replica , sure enough they are not the preferred replica. But there are no other replicas!

    Recreating the AGs from scratch didn't help. What am I missing? Thanks very much in advance.

    * inherited.

    You aren't the only one who has hit this issue. A few people worked around it - check the last few comments in the connect item (that isn't going to be fixed of course):
    sys.fn_hadr_backup_is_preferred_replica always return zero for Availabilty Database

    Do a search on: sys.fn_hadr_backup_is_preferred_replica always return zero
    And you can find a lot of posts with similar issues. Most using the same working arounds in the last few comments on the connect item.

    Sue

  • Thank you, Sue. I did Google but wasn't using the right terms obviously. I'll try some of those suggestions.

Viewing 3 posts - 1 through 2 (of 2 total)

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