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

Troubleshooting Guide: SQL Server Error 959 – Resource Database Version Mismatch

Why This Error Happens

Error 959 occurs when the mssqlsystemresource.mdf and .ldf files do not match the version expected by the installed SQL Server 2025 binaries. This typically happens after an incomplete or failed SQL Server upgrade, a manual restoration of resource database files from a different version, or file corruption caused by improper shutdowns. Because the resource database is read-only and contains all system objects, any version mismatch prevents the Database Engine from starting correctly.

Step-by-Step Resolution Guide

Step 1: Verify the Current Resource Database Files

  • Navigate to the default binaries path: C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\
  • Confirm the presence and timestamps of mssqlsystemresource.mdf and mssqlsystemresource.ldf.
  • Check the SQL Server Error Log (located in ...\MSSQL\Log\ERRORLOG) for the exact version numbers reported in the error message (%d values).

Step 2: Restore the Correct Resource Database Version

  • Locate a backup of the correct resource database version, typically found in the SQL Server installation media under \x64\.
  • Stop the SQL Server service using services.msc or run: NET STOP MSSQLSERVER
  • Copy the correct mssqlsystemresource.mdf and .ldf files into the Binn directory, overwriting the mismatched versions.
  • Restart the service: NET START MSSQLSERVER

Step 3: Run a Repair Installation via Setup

  • If no valid backup copy exists, launch SQL Server 2025 Setup from the installation media or ISO.
  • Select Maintenance > Repair from the SQL Server Installation Center.
  • Choose the affected instance and allow Setup to restore the resource database files to the matching build version.
  • Ensure Windows Update or any pending Cumulative Updates (CUs) are not partially applied during this process.

Step 4: Rebuild System Databases (If Repair Fails)

  • Run Setup again and select the Rebuild Database option from the Advanced tab, or use the command line: Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=BUILTIN\Administrators
  • Reapply the latest Cumulative Update (CU) immediately after rebuilding to realign all system database versions.

Alternative or Verification Steps

  • After restarting the service, check the ERRORLOG file for the line “SQL Server is now ready for client connections,” confirming the resource database loaded successfully.
  • Run SELECT SERVERPROPERTY('ResourceVersion'); in a query window to confirm the version now matches your installed SQL Server build.