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

Why This Error Happens

Error 5702 typically occurs when the SQL Server service account lacks the necessary permissions to initialize a worker process, or when a startup dependency—such as a corrupted system database (master, model, or tempdb)—fails to load correctly. This can also be triggered by resource exhaustion (insufficient memory or handles) on the host, or a conflict with another process holding a lock on required SQL Server files during startup. In clustered or Always On environments, this error can additionally stem from a failed handshake between the SQL Server process and the Windows Server 2025 Cluster Service.

Step-by-Step Resolution Guide

Step 1: Verify Service Account Permissions

  • Open Services.msc and locate the SQL Server (MSSQLSERVER or named instance) service.
  • Confirm the “Log On As” account has Log on as a service rights under Local Security Policy (secpol.msc > Local Policies > User Rights Assignment).
  • Ensure the account has full control over the SQL Server data directory, typically: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA.

Step 2: Check for Corrupted System Databases

  • Start SQL Server in minimal configuration mode by running: sqlservr.exe -f from an elevated Command Prompt.
  • Once started, run DBCC CHECKDB('master') and DBCC CHECKDB('tempdb') to check for corruption.
  • If corruption is found, restore the affected system database from a known good backup or rebuild system databases using the Setup.exe /ACTION=REBUILDDATABASE switch.

Step 3: Review Windows Event Viewer and SQL Error Logs

  • Open Event Viewer > Windows Logs > Application, and filter for Source “MSSQLSERVER”.
  • Cross-reference the timestamp of Error 5702 with entries in the SQL Server ERRORLOG file, located at: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Look for preceding errors related to memory allocation, file I/O, or access denied messages that indicate the true root cause.

Step 4: Free Up System Resources

  • Check Task Manager or Resource Monitor for excessive memory or handle usage by other processes.
  • Increase the Virtual Memory / Page File size via System Properties > Advanced > Performance Settings if physical RAM is constrained.
  • Restart the server if a memory leak from another application is suspected, then attempt to restart the SQL Server service.

Step 5: Reinstall or Repair the SQL Server Instance

  • If the above steps fail, run the SQL Server 2025 setup media and choose the Repair option for the affected instance.
  • Follow the prompts to repair core binaries and instance configuration without affecting existing databases.

Alternative or Verification Steps

  • After applying fixes, restart the SQL Server service and confirm successful startup by checking that the ERRORLOG shows “SQL Server is now ready for client connections” with no further 5702 entries.
  • If the error persists, consider creating a brand new named instance as a temporary workaround to isolate whether the issue is instance-specific or environment-wide.