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

Troubleshooting Guide: SQL Server Error 2590

Why This Error Happens

Error 2590 is a diagnostic/informational message that SQL Server raises when it detects a specific user session actively modifying bytes within a data page, typically surfaced during DBCC CHECKDB or CHECKTABLE operations when consistency errors are found on that page. This usually indicates that concurrent write activity collided with the consistency check, or more seriously, that the page itself has underlying corruption (often caused by faulty storage hardware, improper shutdowns, or disk subsystem failures) that is being exposed as transactional activity is logged against it. In rare cases, this message appears alongside other allocation errors, pointing to a mismatch between the transaction log and the actual page state in the database file.

Step-by-Step Resolution Guide

Step 1: Isolate the Database and Run a Full Consistency Check

  • Open SQL Server Management Studio (SSMS) or sqlcmd and connect to the instance.
  • Run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; to get the full scope of corruption.
  • Note the Page ID (%S_PGID) and byte range referenced in the original Error 2590 message for cross-referencing.

Step 2: Identify and Pause the Offending Session

  • Query sys.dm_exec_sessions and sys.dm_tran_active_transactions to find the specific user/login referenced in the error (%.*ls).
  • If the session is a runaway process or stuck transaction, safely terminate it using KILL [session_id]; to stop further writes to the suspect page.
  • Check SQL Server Error Log (usually at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG) for correlating I/O or storage warnings around the same timestamp.

Step 3: Check Underlying Disk Hardware and Windows Event Viewer

  • Open Windows Event Viewer and navigate to Windows Logs > System to look for Disk or NTFS warnings corresponding to the error timestamp.
  • Run chkdsk D: /f /r (replace D: with your actual data drive letter) during a maintenance window to repair file system-level errors.
  • Verify that Windows Server 2025 storage drivers and firmware for the SAN/RAID controller are fully up to date via Windows Update or vendor tools.

Step 4: Restore From a Clean Backup (If Corruption Is Confirmed)

  • If DBCC CHECKDB confirms physical corruption on the specific page ID, do not rely solely on REPAIR_ALLOW_DATA_LOSS as a first resort.
  • Instead, restore the affected database from the last known good full backup plus transaction log backups up to the point before the corruption occurred.
  • Use: RESTORE DATABASE YourDatabaseName FROM DISK = 'E:\Backups\YourDB_Full.bak' WITH NORECOVERY; followed by log restores.

Alternative or Verification Steps

  • After remediation, re-run DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS; and confirm it returns 0 allocation and consistency errors.
  • If the error recurs immediately after a clean restore, treat it as a hardware-level issue and run a full vendor-specific disk diagnostic (e.g., manufacturer’s SMART utility) rather than repeating SQL-level repairs.