Troubleshooting Guide: SQL Server Error 9047 — “Async Recovery Thread Has Exited Unexpectedly”
Why This Error Happens
This error occurs when SQL Server’s asynchronous recovery worker thread terminates prematurely while attempting to roll forward or roll back transactions during database recovery. The root cause is typically corrupted transaction log files, insufficient system resources (memory or disk I/O) available to the recovery thread, or an underlying storage subsystem failure that prevents the thread from reading log records correctly. In some cases, this is triggered by abrupt power loss, improper shutdown, or antivirus/backup software locking the log file during the recovery sequence.
Step-by-Step Resolution Guide
Step 1: Check the SQL Server Error Log for Root Cause Details
- Navigate to the log directory, typically
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ - Open
ERRORLOGusing Notepad ormore ERRORLOGin Command Prompt. - Look for accompanying errors such as 9001 (log corrupt), 823, or 824 (I/O errors) that occurred immediately before Error 9047.
- Note the specific database name referenced in the recovery failure.
Step 2: Verify Disk Health and Storage Integrity
- Open Windows Server 2025 Event Viewer (
eventvwr.msc) and check the System log for Disk or NTFS warnings correlating with the SQL Server crash timestamp. - Run
chkdsk C: /f /r(replaceC:with your SQL data/log drive) from an elevated Command Prompt and restart if prompted. - If using a SAN or virtual disk, confirm with your storage administrator that no underlying LUN or VHDX corruption occurred.
Step 3: Attempt Manual Database Recovery
- Open SQL Server Management Studio (SSMS) and connect via a Dedicated Admin Connection (DAC) using
ADMIN:ServerName. - Run the following to check database state:
SELECT name, state_desc FROM sys.databases WHERE name = 'YourDatabaseName';
- If the database is stuck in
RECOVERY_PENDING, attempt:
ALTER DATABASE YourDatabaseName SET EMERGENCY;
DBCC CHECKDB('YourDatabaseName') WITH NO_INFOMSGS;
- Review
DBCC CHECKDBoutput for corruption details before proceeding to repair options.
Step 4: Restore from the Last Known Good Backup
- If
DBCC CHECKDBreports unrepairable corruption in the transaction log, restore the full backup followed by transaction log backups up to the last valid LSN. - Use
RESTORE DATABASE YourDatabaseName FROM DISK = 'PathToBackup.bak' WITH NORECOVERY, then apply subsequent log backups withWITH RECOVERYon the final file. - Ensure the service account
NT SERVICE\MSSQLSERVERhas read/write permissions on the restore destination folder.
Step 5: Allocate Sufficient Memory and Validate SQL Server Configuration
- Open SQL Server Configuration Manager and confirm the service account has “Lock Pages in Memory” rights via
secpol.mscunder Local Policies > User Rights Assignment. - In SSMS, run
sp_configure 'max server memory (MB)'to ensure SQL Server isn’t memory-starved relative to total Windows Server 2025 RAM. - Restart the SQL Server service (
net stop MSSQLSERVERthennet start MSSQLSERVER) and monitor the ERRORLOG for successful recovery completion.
Alternative or Verification Steps
- Confirm the fix by checking
sys.databases— thestate_desccolumn should readONLINE, and the ERRORLOG should show “Recovery is complete” without further Error 9047 entries. - If the issue persists after restoration, rebuild the database from scratch using
CREATE DATABASEand re-import data from the last verified clean backup, then enableCHECKSUMpage verification to prevent future recurrence.