How to fix Error 825 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 825 (Read-Retry Warning)

Why This Error Happens

Error 825 is raised when SQL Server 2025 encounters an intermittent I/O failure while reading a page from a database file, but the operation ultimately succeeds after one or more retries. This typically points to underlying storage subsystem instability, such as a failing disk, a flaky SAN/NAS connection, outdated storage drivers, or antivirus/filter-driver interference on Windows Server 2025 or Windows 11. Although the read eventually succeeded, the recurrence of this error signals that the physical storage layer is unreliable and database pages may be at risk of corruption.

Step-by-Step Resolution Guide

Step 1: Review SQL Server and Windows Event Logs

  • Open SQL Server Management Studio (SSMS) and check the SQL Server Error Log for the exact file name and offset reported in the Error 825 message.
  • Open Event Viewer (eventvwr.msc) and inspect the System and Application logs under Windows Logs for correlating Disk, Storport, or iScsiPrt warnings/errors around the same timestamp.
  • Note the disk or LUN identifier tied to the affected .mdf/.ndf/.ldf file path (e.g., D:\SQLData\MyDB.mdf).

Step 2: Run a Full Consistency Check on the Database

  • Open a query window in SSMS and execute: DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;
  • Review the output for any allocation or consistency errors beyond the I/O warning.
  • If corruption is confirmed, restore from the most recent known-good backup using RESTORE DATABASE rather than attempting in-place repair.

Step 3: Validate and Update Storage Drivers/Firmware

  • Open Device Manager (devmgmt.msc) and update the Storage Controller driver (SAS/RAID/HBA) to the latest vendor-certified version for Windows Server 2025.
  • For SAN-attached storage, confirm multipathing (MPIO) is correctly configured via mpclaim.exe -s -d.
  • Check firmware versions on physical disks/controllers against the vendor’s compatibility matrix for Windows Server 2025.

Step 4: Exclude SQL Server Files from Antivirus/Filter Drivers

  • Navigate to your antivirus console and add exclusions for the SQL Server data directories (typically C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\).
  • Exclude file extensions .mdf, .ndf, .ldf, and .bak from real-time scanning.
  • Restart the SQL Server service via services.msc or NET STOP MSSQLSERVER && NET START MSSQLSERVER to apply exclusions cleanly.

Step 5: Enable Enhanced I/O Logging for Monitoring

  • Enable SQL Server’s -T3605 trace flag temporarily (via SQL Server Configuration Manager startup parameters) to capture extended I/O diagnostics in the error log.
  • Monitor Performance Monitor (perfmon.exe) counters under PhysicalDisk > Avg. Disk sec/Read and Avg. Disk sec/Write for latency spikes above 15-20ms, indicating a failing drive.

Alternative or Verification Steps

  • Run DBCC CHECKDB again after 24-48 hours of monitoring to confirm no new consistency errors have appeared, and check the SQL error log to ensure Error 825 has not recurred.
  • If the error persists despite driver updates and exclusions, engage your storage vendor to run hardware-level diagnostics (e.g., chkdsk /f /r on the volume or vendor-specific disk health utilities) and consider migrating the database files to a different physical disk/LUN as a failover test.