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

Troubleshooting Guide: SQL Server Error 10645 — Resumable Operation Already in Progress

Why This Error Happens

This warning occurs because SQL Server detects that a resumable index operation (such as CREATE INDEX, ALTER INDEX REBUILD, or ALTER INDEX REORGANIZE) with identical options was already initiated on the same index and is still in a paused or incomplete state. Rather than starting a new operation, SQL Server’s resumable DDL engine automatically resumes the existing one to prevent duplicate metadata entries and index corruption. This typically happens when a previous session was terminated, disconnected, or failed without explicitly pausing or aborting the operation, leaving it in limbo within sys.index_resumable_operations.

Step-by-Step Resolution Guide

Step 1: Identify the Existing Resumable Operation

  • Open SQL Server Management Studio (SSMS) or Azure Data Studio connected to the target instance.
  • Run the following query to list all active resumable operations:
SELECT name, object_id, index_id, state_desc, percent_complete, start_time, last_pause_time
FROM sys.index_resumable_operations;
  • Note the index_id, object_id, and state_desc (should show PAUSED or RUNNING) for the conflicting index.

Step 2: Decide Whether to Resume or Abort the Operation

  • If the original operation needs to be completed, explicitly resume it rather than issuing a new command:
ALTER INDEX [IndexName] ON [SchemaName].[TableName] RESUME;
  • If the operation is no longer needed or was left in a bad state, abort it cleanly:
ALTER INDEX [IndexName] ON [SchemaName].[TableName] ABORT;
  • Verify no other sessions or jobs (via SQL Server Agent) are concurrently targeting the same index.

Step 3: Clear Orphaned Resumable Index Metadata

  • If ABORT does not clear the entry, check for blocking sessions using:
SELECT * FROM sys.dm_exec_requests WHERE command LIKE '%INDEX%';
  • Kill any orphaned session IDs (SPIDs) holding locks on the index using KILL <SPID>.
  • Re-run the sys.index_resumable_operations query to confirm the entry has been removed.

Step 4: Restart the Index Operation with Correct Options

  • Once the old operation is cleared, re-issue the original CREATE INDEX or ALTER INDEX statement with the RESUMABLE = ON option and matching MAXDOP and ONLINE settings to avoid future mismatches.
  • Example:
ALTER INDEX [IX_Example] ON [dbo].[LargeTable]
REBUILD WITH (ONLINE = ON, RESUMABLE = ON, MAX_DURATION = 60 MINUTES);

Alternative or Verification Steps

  • Confirm resolution by re-querying sys.index_resumable_operations — the table should return no rows for the affected index, and the rebuild/create operation should complete without the warning.
  • If the issue persists after aborting, restart the SQL Server service (via Services.msc on Windows Server 2025/Windows 11) to clear any cached resumable operation metadata that failed to release properly.