Why This Error Happens
Error 3623 occurs when SQL Server encounters an invalid floating point operation during query execution, typically caused by arithmetic operations producing values outside the valid range for FLOAT or REAL data types (such as division resulting in infinity or NaN). This can stem from corrupted intermediate calculation buffers, a mismatched CPU instruction set (SSE/AVX) after a hardware or hypervisor migration, or outdated floating-point unit (FPU) drivers on Windows Server 2025. In some cases, this is also triggered by malformed data pages where numeric values were corrupted during an improper shutdown or storage-level fault.
Step-by-Step Resolution Guide
Step 1: Identify the Offending Query or Stored Procedure
- Check the SQL Server Error Log (
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for the exact timestamp and session ID tied to Error 3623. - Run the following to correlate the session with recent query activity:
SELECT * FROM sys.dm_exec_requests WHERE session_id = <SPID>;
- Isolate whether the error originates from a specific
CAST,CONVERT,SUM, or division operation involvingFLOAT/REALcolumns.
Step 2: Validate Data Integrity on Affected Tables
- Run
DBCC CHECKDBagainst the database to rule out page-level corruption as the source of invalid floating-point values:
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;
- If corruption is found in a table housing
FLOAT/REALcolumns, restore the affected table/filegroup from the last known good backup rather than attempting a repair that may cause data loss.
Step 3: Verify CPU Instruction Set and Update Drivers
- On Windows Server 2025/Windows 11 hosts (especially VMs recently migrated between hosts), confirm the hypervisor exposes a consistent CPU feature set (SSE4.2/AVX2) to avoid FPU emulation mismatches.
- Update the chipset and CPU microcode drivers via Windows Update > Optional Updates > Driver Updates, or manually through the OEM/hypervisor vendor (e.g., VMware Tools, Hyper-V Integration Services).
- Restart the SQL Server service after driver updates:
Restart-Service -Name 'MSSQLSERVER' -Force
Step 4: Apply the Latest SQL Server 2025 Cumulative Update
- Download and install the latest Cumulative Update (CU) for SQL Server 2025 from the Microsoft Update Catalog, as floating-point handling bugs in specific query optimizer paths are frequently patched.
- Verify the current build number before and after patching:
SELECT @@VERSION;
Step 5: Rewrite Problematic Arithmetic Logic
- Modify the query to use
TRY_CONVERTor add explicitNULLIFguards around division operations to prevent invalid float results:
SELECT ColumnA / NULLIF(ColumnB, 0) FROM YourTable;
- Replace
FLOAT/REALwithDECIMAL/NUMERICwhere precision-sensitive calculations are not reliant on floating-point behavior.
Alternative or Verification Steps
- Re-run the original failing query or job after each step; confirm no Error 3623 appears in the SQL Server Error Log for at least one full execution cycle (e.g., 24 hours for scheduled jobs).
- If the error persists after patching and driver updates, isolate the query in a test environment with
SET ARITHABORT ONandSET ANSI_WARNINGS ONto force SQL Server to surface the exact row/column causing the invalid operation for targeted remediation.