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

Troubleshooting Guide: Error 5286 – Page Could Not Be Moved (Active Online Index Build with LOBs)

Why This Error Happens

This error occurs when SQL Server’s shrink or defragmentation process attempts to relocate a data page that is currently locked by an active online index build operation involving LOB (Large Object) data types such as VARCHAR(MAX), VARBINARY(MAX), or XML. Because online index operations maintain a separate mapping structure for LOB pages during the build, the page relocation engine cannot safely move these pages without risking data corruption, so SQL Server blocks the move and raises Error 5286. This is typically a transient concurrency conflict rather than actual corruption, often triggered when DBCC SHRINKFILE, DBCC SHRINKDATABASE, or auto-shrink runs concurrently with a long-running ONLINE = ON index rebuild.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Online Index Operation

  • Query sys.dm_exec_requests and sys.index_resumable_operations to find active online index builds: SELECT * FROM sys.dm_exec_requests WHERE command LIKE '%INDEX%';
  • Cross-reference the session ID (SPID) with sys.dm_exec_sql_text(sql_handle) to confirm it is a LOB-related index rebuild.
  • Note the databaseid and objectid to correlate with the shrink operation that triggered Error 5286.

Step 2: Pause or Reschedule the Shrink Operation

  • Cancel the active DBCC SHRINKFILE or DBCC SHRINKDATABASE session using KILL <SPID> once you confirm it is safe to terminate.
  • Disable Auto-Shrink on the affected database via SSMS: Right-click database > Properties > Options > set “Auto Shrink” to False.
  • Alternatively, run: ALTER DATABASE [YourDB] SET AUTO_SHRINK OFF;

Step 3: Allow the Online Index Build to Complete

  • Monitor progress using SELECT percent_complete, estimated_completion_time FROM sys.dm_exec_requests WHERE command = 'ALTER INDEX';
  • Avoid running shrink operations until percent_complete reaches 100 and the session clears from sys.dm_exec_requests.
  • For very large LOB tables, consider using ALTER INDEX ... RESUME with MAX_DURATION and WAIT_AT_LOW_PRIORITY options (new in SQL Server 2025) to better control blocking windows.

Step 4: Re-run the Shrink Operation Sequentially

  • Once the index rebuild completes, re-issue the shrink command in isolation: DBCC SHRINKFILE (N'YourDataFile', 0);
  • Schedule shrink operations via SQL Agent during maintenance windows when no ONLINE = ON index operations are scheduled.
  • Confirm no other resumable index operations are paused mid-build using sys.index_resumable_operations.

Step 5: Apply Latest Cumulative Update

  • Verify your SQL Server 2025 build number via SELECT @@VERSION; and compare against the latest Cumulative Update (CU) on the Microsoft Update Catalog.
  • Install the latest CU, as this error has known fixes related to LOB page-mapping race conditions in earlier SQL Server 2025 builds.
  • Restart the SQL Server service via services.msc or net stop MSSQLSERVER && net start MSSQLSERVER after patching.

Alternative or Verification Steps

  • Verify the fix by re-running DBCC SHRINKFILE against the same file after the index operation completes — it should finish without raising Error 5286, and check sys.dm_db_file_space_usage to confirm space was reclaimed.
  • If the error persists outside of shrink operations, run DBCC CHECKDB with NO_INFOMSGS, ALL_ERRORMSGS to rule out actual page-level corruption as an underlying cause.