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

Why This Error Happens

Error 2280 in SQL Server 2025 typically surfaces when the Database Engine cannot resolve metadata for a column or object while a client (SSMS, Azure Data Studio, or a custom app) is actively retrieving data — hence the “Getting Data” status that appears to hang indefinitely. This is most commonly caused by a corrupted statistics object, a blocking session holding a schema-stability (Sch-S) lock, or an Always Encrypted/Column Master Key configuration that the client cannot resolve at query time. In some cases, it is also triggered by a damaged non-clustered index that the Query Optimizer references during data retrieval.

Step-by-Step Resolution Guide

Step 1: Identify Blocking Sessions and Active Locks

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run sp_who2 or query sys.dm_exec_requests to check for sessions in a SUSPENDED or BLOCKED state.
  • Look specifically for sessions holding Sch-S or Sch-M locks on the target table.
  • If a blocking session is found, note the SPID and consider terminating it with KILL <SPID> only after confirming it is safe to do so.

Step 2: Rebuild Statistics and Indexes on the Affected Table

  • Open a new query window and run: EXEC sp_updatestats;
  • Follow this with a targeted rebuild: ALTER INDEX ALL ON [YourDatabase].[dbo].[YourTable] REBUILD;
  • Run DBCC CHECKTABLE ('YourTable') WITH NO_INFOMSGS, ALL_ERRORMSGS; to confirm there is no underlying corruption causing Error 2280.

Step 3: Verify Always Encrypted / Column Master Key Resolution

  • In SSMS, go to Query > Connection > Change Connection, and ensure “Always Encrypted” is enabled if the table uses encrypted columns.
  • Confirm the Column Master Key is accessible: navigate to Database > Security > Always Encrypted Keys in Object Explorer.
  • On the client machine, verify the certificate exists in Certificate Manager (certmgr.msc) > Personal > Certificates and that the calling account has read access to the private key.

Step 4: Restart the SQL Server Service and Clear Cached Plans

  • Open Services.msc (Windows Server 2025 / Windows 11) and restart the SQL Server (MSSQLSERVER) service.
  • Alternatively, run DBCC FREEPROCCACHE; to clear any stale execution plans that may be referencing invalid metadata.
  • Re-run the original query that triggered Error 2280 to confirm resolution.

Alternative or Verification Steps

  • Re-execute the original SELECT statement or refresh the Object Explorer in SSMS — the query should now return results without hanging or throwing Error 2280.
  • If the error persists, restore the affected table from a recent backup using RESTORE DATABASE ... WITH RECOVERY in a test environment, then run DBCC CHECKDB to rule out deeper corruption before re-attempting data retrieval on production.