SQL Server: access violation querying sys.dm_exec_requests during database recovery
Summary
Queries against sys.dm_exec_requests can raise an access violation and generate a dump file while a database is still recovering. Microsoft confirms the issue for SQL Server 2025 and 2022 updates and is investigating a fix. Mitigations are available.
Symptoms
A query against sys.dm_exec_requests fails with exception c0000005 EXCEPTION_ACCESS_VIOLATION and SQL Server writes a stack dump. This can happen during a database RESTORE, during startup recovery or before an availability group replica finishes coming online. The error log shows the message that the database is marked RESTORING and is in a state that does not allow recovery to be run, followed by the stack dump entries. The cause is that internal in-memory structures are referenced before they are fully initialized.
Affected
- SQL Server 2025 CU10 (KB5125471)
- SQL Server 2025 CU9 + GDR (KB5126967)
- SQL Server 2022 CU27 (KB5104824)
- SQL Server 2022 CU27 + GDR (KB5126934)
Workaround
- Enable trace flag 4696 to opt out of the code change that causes this issue. Monitoring queries against sys.dm_exec_requests or sys.sysprocesses on secondary replicas might then return error 976 or 978, as before the update.
- Alternatively, avoid queries against sys.dm_exec_requests for databases that are recovering.
- Alternatively, uninstall the update.
Fix
Not fixed yet. Microsoft is investigating a fix.
Recommendation
Check whether monitoring tools or stored procedures query sys.dm_exec_requests while restores, restarts or availability group failovers are running. If so, enable trace flag 4696 or pause those queries until Microsoft ships a fix. Test the trace flag first, because secondary replica monitoring may return errors 976 or 978. Uninstalling the update should be the last resort.
Sources
- SQL Server 2025 CU10 (KB5125471): Access violation when you query sys.dm_exec_requests during database recovery Vendor · support.microsoft.com
Compiled from the sources listed and translated with AI (Claude); status and dates come from the vendor. The vendor’s statements are authoritative. Updated 1 Nov 2026, 22:05.
Where the information comes from
We continuously read the vendors’ official sources, community reports and trade media and summarise them in our own words, with a link to the source:
- Microsoft: Windows release health (Windows 10/11, Server 2016 to 2025), Windows message center, known issues of Microsoft 365 Apps (Outlook, Excel, Word, PowerPoint), Edge, Intune, Autopilot, Windows 365 and Entra Connect, Microsoft KB articles with timelines, Exchange and Windows IT Pro blogs, optionally Microsoft 365 service health and message center
- other vendors: Veeam KB, Citrix (known issues), Ubuntu and Debian (regressions), Broadcom (VMware), Fortinet, Cisco, Mozilla, Let’s Encrypt
- community (title, short excerpt and link only, without the names of the authors): Microsoft Q&A, Microsoft Tech Community (discussions), Veeam R&D Forums, Eleven Forum
- targeted web research with AI (Claude), e.g. on the updates of the month – this also finds discussions on Reddit and in forums; such entries are labelled as community reports until the vendor confirms them
- early warning from trade media (title and link only): Born’s Tech and Windows World, BleepingComputer, AskWoody, Windows Latest, Windows Central, gHacks, The Windows Club, Deskmodder, Dr. Windows, WindowsArea, Frankys Web, heise online
Summary and translation with AI (Claude by Anthropic) – without any data of visitors.
Affected? We can help.
We check whether your systems are affected, apply workarounds properly and plan for dated changes in good time.
