Why This Error Happens
Error 490 in SQL Server 2025 typically occurs when the database is involved in an Availability Group or Log Shipping configuration where the resync process has been intentionally suspended due to a detected inconsistency between the primary and secondary replicas. This commonly happens after an unexpected failover, a network partition during transaction log transfer, or when the transaction log on the secondary has grown beyond the disk quota allocated in SQL Server Configuration Manager. Additionally, corrupted metadata in the msdb system database can prevent the Resync Worker thread from initializing correctly on startup.
Step-by-Step Resolution Guide
Step 1: Verify Service Account Permissions
- Open Services.msc on Windows Server 2025 and confirm the SQL Server Agent is running under a domain account with
db_ownerrights on the replicated database. - Check that the account has Log on as a service rights via
secpol.msc> Local Policies > User Rights Assignment.
Step 2: Check Disk Space and Log File Growth
- Navigate to the transaction log directory (default:
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA). - Run the following command in SSMS to check log usage:
DBCC SQLPERF(LOGSPACE);
- If usage exceeds 90%, manually truncate the log or expand the volume in Disk Management.
Step 3: Manually Re-enable the Resync Process
- Open a New Query window in SQL Server Management Studio (SSMS) connected to the Primary Replica.
- Execute the following T-SQL command to force a manual restart of the synchronization state:
ALTER DATABASE [YourDatabaseName] SET HADR RESUME;
- If the command fails, restart the SQL Server (MSSQLSERVER) service via PowerShell:
Restart-Service -Name 'MSSQLSERVER' -Force
Step 4: Rebuild the Resync Metadata Cache
- If the error persists, drop and reconfigure the specific Availability Group listener responsible for the resync job.
- Use
sp_help_replication_agents_statusto identify orphaned resync threads and terminate them viaKILL [Session_ID].
Alternative or Verification Steps
- Verify the Fix: Check the SQL Server Error Log (via SSMS > Management > SQL Server Logs) to confirm the entry “Resync process completed successfully” appears without a subsequent Error 490 re-trigger.
- Alternative Solution: If the resync remains disabled, remove the database from the Availability Group entirely and use the Full Database Backup and Restore wizard to establish a fresh secondary replica, bypassing the corrupted resync state entirely.