Hi,
Environrment : SQL Server 2022, build 16.0.4252.3 (CU24 + GDR, May 2026)
We are experiencing an intermittent issue on Microsoft SQL Server 2022 Enterprise Edition running in an Always On Availability Group environment.A specific stored procedure SP_XXXX_NAME executes successfully most of the time (approximately every 15–30 minutes). However, intermittently, the execution results in an internal Query Processor error, and SQL Server generates a dump file.
In most cases, SQL Server continues running after the dump is generated, and the Availability Group remains online. However, on a few occasions, the Availability Group transitions to the secondary replica without the SQL Server service restarting.
The SQL Error Log records the following:
ex_dump_if_requested: Exception raised, major=86, minor=24, state=246, severity=16
followed by:
Internal Query Processor Error:
The query processor could not produce a query plan.
For more information, contact Customer Support Services.
Windows Error Reporting captures:
Fault bucket: INVALID_REQUEST
Event Name: SQLException64
Problem signature:
P1: sqlservr.exe
P2: 0.0.0.0
P3: 0000000000000000
P4: sqllang.dll
P5: 16.0.4252.3
P6: 0000000069EE2EEE
P7: 17068
P8: 00000000003D9476
P9: 00000000C1FA39D3
A SQL dump is generated every time this issue occurs (SQLDumpxxxx.mdmp, SQLDumpxxxx.txt, and SQLDumpxxxx.log).
AG behavior
We have observed the following behavior:
- Every occurrence generates a SQL dump.
- Most dump events do not trigger an Availability Group failover.
- Occasionally, the Availability Group transitions to the secondary replica.
- The SQL Server service does not restart during these events (the SQL Server start time remains unchanged).
During the failover scenario, the SQL Error Log contains messages similar to:
Always On: The local replica of availability group '<AG_Name>' is preparing to transition to the resolving role.
The availability group '<AG_Name>' is being asked to stop the lease renewal because the availability group is going offline.
Remote harden of transaction failed.
However, we do not observe explicit lease timeout or HealthCheckTimeout messages in the SQL Server Error Log or Windows Failover Cluster Event Viewer. The cluster logs mainly contain Event IDs 1069 and 1025 during the failover.
Pls suggest whether this is a known issue or defect in SQL Server 2022 (build 16.0.4252.3), particularly within sqllang.dll or the Query Optimizer/Query Processor.
Explain why the same exception sometimes only generates a dump, while in other cases it causes the Availability Group to transition to the secondary replica even though the SQL Server service remains running.
Advise whether there are any available hotfixes, cumulative updates, or recommended workarounds.
Confirm whether this behavior is related to the database compatibility level (currently 120) or a known optimizer issue.
We appreciate your assistance and look forward to your analysis and recommendations.