Additional SQL Server features and topics not covered by specific categories
Check the SQL Server startup log for Using locked pages in the memory manager; if it appears and this VM runs Windows Server 2025, disable Lock pages in memory (LPIM) for the SQL Server service account and restart Windows—the combination is a documented SQL Server 2025 access-violation issue.^1^
Apply the documented workaround
- Open the current SQL Server
ERRORLOG, normally under:C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\LOG - Search the startup section for:
Using locked pages in the memory manager. - If that message is present:
- Open Local Security Policy (
secpol.msc). - Go to Local Policies → User Rights Assignment.
- Open Lock pages in memory.
- Remove the account running the SQL Server Database Engine service.
- If the right is controlled through domain Group Policy, have the domain administrator remove that account from the corresponding policy.
- Restart Windows, then check whether a new
SQLDump*.txtis generated.
- Open Local Security Policy (
LPIM is active when the account running sqlservr.exe has that Windows user right. Removing the right disables locked pages for SQL Server.^2^
Disabling LPIM can affect memory paging under pressure, but it is the published workaround for this specific Windows Server 2025 condition.
If the locked-pages message is absent
The displayed c0000005 EXCEPTION_ACCESS_VIOLATION confirms an invalid memory access, but the excerpt alone does not identify which SQL Server component or request caused it.
Your build 17.0.5015.4 is the CU9+GDR servicing branch.^3^ The next available update is SQL Server 2025 CU10, build 17.0.5035.5; install it in a test environment first and then apply it using your normal change process.^4^
Be aware that CU10 documents a separate access violation if monitoring queries access sys.dm_exec_requests while a database is recovering during startup. If the dump’s Input Buffer names a monitoring procedure that queries this DMV, use the documented CU10 mitigations:
- Avoid querying
sys.dm_exec_requestsuntil startup recovery completes; or - Enable trace flag
4696, accepting that monitoring secondary replicas can then return errors 976 or 978.^4^
Do not apply that trace flag to CU9 merely because the exception code matches; the documented condition is specific to CU10 and database recovery.
Identify the triggering component
Review the dump and ERRORLOG entries immediately before BEGIN STACK DUMP, especially:
-
Input Bufferor the executing stored procedure. -
Exception Addressand module name. - Database recovery messages.
-
SESSION_CONTEXTusage in parallel queries. SQL Server 2025 documents AV dumps under that condition and recommends avoiding parallel execution for those calls.^1^ - In-process third-party providers, CLR modules, extended stored procedures, or monitoring agents.
Escalation
If the dump continues after the applicable workaround and current servicing update, collect:
- Complete current and archived
ERRORLOGfiles. -
SQLDump*.txt,.mdmp, and.logfiles from the LOG directory. - Windows Application and System event logs.
- The query, Agent job, or monitoring process active at startup.
- SQL Server configuration and database recovery state.
Microsoft recommends SQL LogScout’s DumpMemory scenario for collecting automatically generated SQL Server dumps.^5^ Open a Microsoft support request with that package because conclusive stack-dump analysis commonly requires SQL Server symbols and source-level investigation.
References