Skip to main content

SQL Log Backup Failure Due to Availability Group Health and Version Mismatch

SQL Log Backup Failure Due to Availability Group Health and Version Mismatch

Updated this week

Problem description

  • Intermittent log backup failures are observed for SQL workloads configured in an Availability Group (AG).

  • Upon log and dashboard analysis, it is evident that the AG is not in a healthy state. Specifically, replica nodes are marked as “Not Synchronizing”, and database sync health is reported as 0.

  • This issue typically occurs in scenarios where there is a version mismatch between primary and secondary SQL Server nodes in an AG configuration.

Cause

  • The issue is caused by a version discrepancy between the nodes in the AG setup:

  • The primary instance SQL03B is running SQL Server version 904+.

  • The secondary instance SQL03A is running an older SQL Server version 869.

  • Due to this version mismatch, the older secondary node is unable to synchronize databases that were created or upgraded on the newer primary node. SQL Server does not support downgrading databases, hence synchronization fails, leading to log backup failures in Druva.

Traceback

  • Replica sync health reported as 0

  • AG replica status: Not Synchronizing

  • SQL ERRORLOG and AG dashboard clearly indicate AG health issues

  • Query outputs confirm version differences and sync failures

Resolution

  1. Upgrade Required:

    1. Upgrade the SQL Server instance on CDCTIVSQL03A to match or exceed the version on FDCTIVSQL03B (at least version 904).

    2. This upgrade must be handled by the customer’s DBA as it involves infrastructure changes.

  2. Ensure Version Parity Across Nodes:

    1. Going forward, ensure all AG replica nodes are running the same SQL Server version to avoid synchronization problems.

  3. Post Upgrade Behavior:

    1. After upgrading, the databases should automatically rejoin the availability group without manual intervention.

Verification

  • Use SQL Server Management Studio (SSMS) or PowerShell to verify:

  • AG state is Healthy

  • All replicas are Synchronizing

  • Confirm log backup jobs complete successfully in the Druva console

  • Use the following SQL queries to verify Availability Group health and configuration:

    AG & Replica Info
    SELECT
    ag.name AS AGName,
    ag.cluster_type_desc,
    ag.basic_features,
    replica.server_name,
    replica.role_desc
    FROM sys.availability_groups ag
    JOIN sys.availability_replicas replica ON ag.group_id = replica.group_id;

    Check if Clustered
    SELECT CAST(SERVERPROPERTY('IsClustered') AS nvarchar) AS clus;
    AG Info Based on AG Name
    SELECT TOP 1 AGC.group_id, automated_backup_preference
    FROM sys.availability_groups_cluster AS AGC
    INNER JOIN sys.dm_hadr_availability_replica_cluster_states AS RCS
    ON RCS.group_id = AGC.group_id
    WHERE AGC.name = <AG_name>;

    AG List in the Given Cluster
    SELECT DISTINCT AGC.name
    FROM sys.availability_groups_cluster AS AGC
    INNER JOIN sys.dm_hadr_availability_replica_cluster_states AS RCS
    ON RCS.group_id = AGC.group_id
    INNER JOIN sys.availability_replicas AS AR
    ON AR.replica_id = RCS.replica_id;

    Detailed AG List in the Given Cluster
    SELECT *
    FROM sys.availability_groups_cluster AS AGC
    INNER JOIN sys.dm_hadr_availability_replica_cluster_states AS RCS
    ON RCS.group_id = AGC.group_id
    INNER JOIN sys.availability_replicas AS AR
    ON AR.replica_id = RCS.replica_id;

    AG Detailed Info
    SELECT ARCN.node_name, RCS.replica_server_name, RCS.replica_id, ARS.role, ARS.is_local,
    ARS.connected_state, AR.backup_priority, AGC.group_id, ARS.synchronization_health AS replica_sync_health,
    AR.secondary_role_allow_connections
    FROM sys.availability_groups_cluster AS AGC
    INNER JOIN sys.dm_hadr_availability_replica_cluster_states AS RCS
    ON RCS.group_id = AGC.group_id
    INNER JOIN sys.dm_hadr_availability_replica_states AS ARS
    ON ARS.replica_id = RCS.replica_id
    INNER JOIN sys.dm_hadr_availability_replica_cluster_nodes AS ARCN
    ON ARCN.group_name = AGC.name AND ARCN.replica_server_name = RCS.replica_server_name
    INNER JOIN sys.availability_replicas AS AR
    ON AR.replica_id = RCS.replica_id
    WHERE AGC.name = <AG Name>;

See also

Did this answer your question?