Troubleshooting Guide: SQL Server Error 9976 — Service Shutting Down Unexpectedly
Why This Error Happens
Error 9976 occurs when the SQL Server service encounters a critical, unrecoverable condition during runtime and forces a controlled shutdown to prevent data corruption. This is typically triggered by corrupted system database files (particularly master or tempdb), insufficient permissions on the service account for key directories, or a conflict caused by an improperly configured startup parameter. In some cases, this error also surfaces when Windows Server 2025 security policies (such as newly enforced Credential Guard or Virtualization-Based Security) block the SQL Server process from accessing protected memory pages during initialization.
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 Full Control on
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA. - Re-apply permissions using:
icacls "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA" /grant "NT SERVICE\MSSQLSERVER":(OI)(CI)F - Restart the service to test if the permission reset resolves the shutdown.
Step 2: Check the SQL Server Error Log for Root Cause
- Navigate to
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG. - Search for entries immediately preceding Error 9976, such as “FCB::Open failed” or “Unable to open the physical file.”
- Identify if a specific database file (.mdf/.ldf) is flagged as inaccessible or corrupt.
- Note the exact timestamp to cross-reference with Windows Event Viewer (System log).
Step 3: Rebuild or Repair System Databases
- If
tempdbormasteris corrupted, start SQL Server in single-user mode via Command Prompt:NET START MSSQLSERVER /f /T3608 - Connect via
sqlcmd -S .\MSSQLSERVERand runDBCC CHECKDBagainst suspect databases. - If
masteris unrecoverable, use the SQL Server 2025 installation media to run theREBUILDDATABASEsetup action. - Exit single-user mode and restart the service normally.
Step 4: Disable Conflicting Security Policies
- Open Local Group Policy Editor (
gpedit.msc) and navigate toComputer Configuration > Administrative Templates > System > Device Guard. - Temporarily disable Virtualization Based Security to rule out memory-locking conflicts with the SQL Server buffer pool.
- Reboot the server and attempt to start the
MSSQLSERVERservice again.
Alternative or Verification Steps
- Verify the fix by opening Event Viewer > Windows Logs > System and confirming no new Event ID 9976 entries appear after three consecutive service restarts.
- If the error persists, run
sqlservr.exe -c -mdirectly from the Binn directory in an elevated Command Prompt to view real-time console output and catch the exact exception bypassing the Windows Service Manager.