How to fix Error 3062 on Windows Server 2025 / Windows 11

Troubleshooting Guide: Error 3062 — Backup Failed on Always On Availability Group Secondary Replica

Why This Error Happens

Error 3062 occurs when a backup operation is attempted against an Always On Availability Group (HADRON) secondary replica while that replica is not in a SYNCHRONIZED or SYNCHRONIZING state. This typically happens because the replica has fallen into a RESOLVING, NOT SYNCHRONIZING, or DISCONNECTED state due to network latency, a paused data movement session, or a recent failover event. SQL Server enforces this restriction because backing up a database in an inconsistent synchronization state could produce a backup file with incomplete or corrupted transaction log data.

Step-by-Step Resolution Guide

Step 1: Verify the Current Synchronization State

  • Open SQL Server Management Studio (SSMS) and connect to the secondary replica instance.
  • Run the following query to check replica health:
  SELECT ar.replica_server_name, drs.synchronization_state_desc, drs.is_suspended
  FROM sys.dm_hadr_database_replica_states drs
  JOIN sys.availability_replicas ar ON drs.replica_id = ar.replica_id;
  • Confirm whether the state shows NOT SYNCHRONIZING, RESOLVING, or SUSPENDED instead of SYNCHRONIZED/SYNCHRONIZING.

Step 2: Resume Data Movement if Suspended

  • If is_suspended = 1, data movement has been manually or automatically paused.
  • In SSMS, navigate to Always On High Availability > Availability Databases, right-click the affected database, and select Resume Data Movement.
  • Alternatively, run:
  ALTER DATABASE [YourDatabaseName] SET HADR RESUME;

Step 3: Check Network and Endpoint Connectivity

  • Validate that the database mirroring endpoint (default TCP port 5022) is reachable between primary and secondary nodes.
  • On Windows Server 2025, test connectivity using:
  Test-NetConnection -ComputerName <PrimaryReplicaName> -Port 5022
  • Check the Windows Firewall with Advanced Security rules and ensure inbound/outbound rules allow traffic on the HADR endpoint port.
  • Review the SQL Server Error Log and sys.dm_hadr_availability_replica_states for connection failures.

Step 4: Review Availability Group Health in Cluster Manager

  • Open Failover Cluster Manager on Windows Server 2025 and inspect the Availability Group resource for warnings.
  • Check Roles > [AG Name] > Resources for a status of “Online (Partial)” or “Failed,” which indicates quorum or heartbeat issues affecting synchronization.
  • Restart the Always On Availability Groups service resource if it shows a degraded state.

Step 5: Re-Attempt the Backup Once Synchronized

  • Once the state returns to SYNCHRONIZED or SYNCHRONIZING, retry the backup job (whether via SQL Agent, Maintenance Plan, or manual T-SQL BACKUP DATABASE command).
  • If backups are routed through an Availability Group listener, confirm the Backup Preferences (Secondary Only / Prefer Secondary) in the AG properties are correctly pointing to a healthy node.

Alternative or Verification Steps

  • Run SELECT * FROM sys.dm_hadr_database_replica_states; again post-fix to confirm synchronization_state_desc = 'SYNCHRONIZED' before scheduling backups.
  • If synchronization cannot be restored, temporarily redirect the backup job to the Primary Replica using BACKUP DATABASE ... WITH COPY_ONLY until the secondary’s health is fully restored.