In SQL server 2025 version dump files are created after reboot, After checking its showing bug in the software

Marugalla, Naresh (Ext) 0 Reputation points
2026-10-29T06:47:27.0866667+00:00

***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\LOG\SQLDump0027.txt                                                                             SqlDumpExceptionHandler: Process 13 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.                                                  * *******************************************************************************

 

This file is generated by Microsoft SQL Server                                                                                                                                              version 17.0.5015.4                                                                                                                                                                         upon detection of fatal unexpected error. Please return this file,                                                                                                                          the query or program that produced the bugcheck, the database and                                                                                                                           the error log, and any other pertinent information with a Service Request.                                                                                                                  Computer type is Intel(R) Xeon(R) Gold 6454S.                                                                                                                                               Bios Version is INTEL  - 6040000                                                                                                                                                            VMW201.00V.24504846.B64.2501180339                                                                                                                                                          4 X64 level 8664, 10 Mhz processor (s).                                                                                                                                                     Windows NT 10.0 Build 26100 CSD .                                                                                                                                                           Memory                                MemoryLoad = 18%                      Total Physical = 16383 MB             Available Physical = 13352 MB         Total Page File = 18815 MB            Available Page File = 15929 MB        Total Virtual = 134217727 MB          Available Virtual = 134182274 MB      ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\LOG\SQLDump0027.txt                                                                             SqlDumpExceptionHandler: Process 13 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.                                                  * *******************************************************************************

 

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


3 answers

Sort by: Most helpful
  1. Paul Thomas 80 Reputation points
    2026-11-02T04:43:17.6866667+00:00

    Update: Erland pointed out that Naresh's ERRORLOG already shows -T4696 as a startup parameter, which I missed. That's the documented workaround for the known issue below, so this probably isn't the cause here. I've left the details in case they help someone on the same build, but the input buffer in SQLDump0027.txt is still the quickest way to see what's actually crashing.

    One more thing worth checking. Your build, 17.0.5015.4, is the October security update for CU9 (KB5126967). Microsoft lists a known issue for this build that fits your symptoms closely: a dump on every restart, while SQL Server keeps running.

    The known issue

    The KB article calls it "Access violation when you query sys.dm_exec_requests during database recovery". If anything queries sys.dm_exec_requests while a database is still recovering, which includes startup recovery right after a restart, SQL Server can raise c0000005 EXCEPTION_ACCESS_VIOLATION and write a dump. A monitoring tool or a SQL Agent job that runs as soon as the service starts is the typical trigger. The issue is still listed as unfixed in CU10 (17.0.5035.5), so updating to CU10 alone won't fix it.

    How to confirm it before changing anything

    The dump text file names the statement that crashed. Open SQLDump0027.txt in the LOG folder and look for the Input Buffer section near the top. Then check two things.

    • What the input buffer shows. If it shows a query or procedure that reads sys.dm_exec_requests (or sys.sysprocesses), this known issue is very likely the cause. The program name or procedure name usually tells you which tool sent it.
    • What the ERRORLOG shows. The dump should appear while databases are still starting up or recovering, before the "Recovery is complete" message.

    If the input buffer shows something unrelated, this isn't your issue, and Erland's suggestions plus a support case are the way forward.

    If it is the known issue

    Microsoft documents three workarounds:

    1. Keep monitoring queries away from recovering databases. Delay the monitoring tool or Agent job until recovery completes after a restart. This is the least intrusive fix.
    2. Trace flag 4696. This opts out of the code change that causes the crash. Because the dump happens at startup, it would need to be a startup parameter (-T4696 in SQL Server Configuration Manager). Its documented side effect is that monitoring queries on availability group secondary replicas can return errors 976 or 978, as they did before this update. As Erland said, don't add trace flags on a guess. Only use this one after the input buffer confirms the issue, and test it outside production first.
    3. Uninstall the update until Microsoft ships a fix.

    I drafted this answer with help from Copilot and verified the details myself, in line with the Microsoft Q&A AI usage policy.

    Was this answer helpful?

    1 person found this answer helpful.

  2. Erland Sommarskog 138.6K Reputation points MVP Volunteer Moderator
    2026-10-29T11:45:05.9533333+00:00

    First, please don't post multiple questions about the same issue.

    Next, for a situation like this, you do best in ignoring the AI answer. This is not likely to be a known issue that the AI has information about, so it is just guessing wildly. Or hallucinates. I saw that it suggested a trace flag in one of its responses. That is unlikely to be the solution. Rather, it could make matters worse.

    So you get this dump every time SQL Server starts? Does SQL Server keeps on running, or is SQL Server entirely unusable?

    Stack dumps like this are often tokens of a bug in SQL Server, and the best way to get them resolved is to open a support case with Microsoft. This should in the end be of no cost for you in the end, if the issue is indeed due to a bug. However, your organization would need to have a support contract.

    However, if it occurs at startup, this suggests that there is something in your environments that triggers the problem, so you may want to investigate this.

    Particularly, you should check if you have any of the following:

    • Unsafe assemblies.
    • External stored procedures, home-written or third-party writen.
    • Any use of the sp_OAxxxx procedures.
    • Linked servers using OLE DB providers or ODBC drivers from other vendors than Microsoft, and which runs in-process.

    These are all things that could clobber SQL Server's own memory and lead to severe accidents.

    I guess faulty hardware can also could cause accidents like this.

    Was this answer helpful?


  3. AI answer

    2026-10-29T06:48:35.2966667+00:00

    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

    1. Open the current SQL Server ERRORLOG, normally under:
         C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\LOG
      
    2. Search the startup section for:
         Using locked pages in the memory manager.
      
    3. 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*.txt is generated.

    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_requests until 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 Buffer or the executing stored procedure.
    • Exception Address and module name.
    • Database recovery messages.
    • SESSION_CONTEXT usage 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 ERRORLOG files.
    • SQLDump*.txt, .mdmp, and .log files 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

    1. SQL Server 2025 known issues
    2. Server memory configuration options
    3. KB5126967 - Description of the security update for SQL Server 2025 CU9 ...
    4. KB5125471 - Cumulative Update 10 for SQL Server 2025
    5. Troubleshooting and diagnostic tools for SQL Server on-premises and hybrid scenarios
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.