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

Troubleshooting Guide: Error 10641 – ALTER INDEX PAUSE Failed

Why This Error Happens

This error occurs when SQL Server cannot find an actively running resumable index operation to pause, typically because the operation already completed, failed, or was never started in a resumable state. It can also happen if the index operation was previously paused, aborted, or resumed by another session before your command executed, or if the index name/object name specified does not match an operation currently tracked in sys.index_resumable_operations. Additionally, this can occur due to a race condition in scripts where a PAUSE command is issued immediately after a CREATE/REBUILD/ALTER INDEX statement without confirming the operation is actually in a resumable, running state.

Step-by-Step Resolution Guide

Step 1: Verify the Index Operation Actually Exists

  • Query sys.index_resumable_operations to confirm there is a row for the target index and table:
  SELECT name, object_id, index_id, state, state_desc, last_max_dop_used, start_time, percent_complete
  FROM sys.index_resumable_operations;
  • Confirm the state_desc column shows RUNNING and not PAUSED, COMPLETED, or FAILED.
  • If no rows are returned, the resumable operation does not exist or has already ended.

Step 2: Check for Premature or Duplicate Script Execution

  • Review any automation, deployment pipelines, or maintenance scripts that issue ALTER INDEX ... RESUME or ALTER INDEX ... PAUSE back-to-back.
  • Ensure the original CREATE INDEX ... WITH (RESUMABLE = ON) or ALTER INDEX ... REBUILD WITH (RESUMABLE = ON) statement completed initialization before issuing a PAUSE command.
  • Add a short delay or a polling loop using WAITFOR DELAY '00:00:02' combined with the sys.index_resumable_operations check before attempting the PAUSE.

Step 3: Confirm the Correct Object and Index Names

  • Double-check that the schema, table, and index names in your ALTER INDEX <index_name> ON <table_name> PAUSE statement exactly match the names returned in sys.index_resumable_operations.
  • Watch for case sensitivity issues if your instance is using a case-sensitive collation.
  • Re-run the query from Step 1 immediately before executing PAUSE to avoid acting on stale metadata.

Step 4: Check SQL Server Error Log and Extended Events

  • Open SQL Server Management Studio (SSMS) and navigate to Management > SQL Server Logs to check if the resumable operation was aborted due to an error (e.g., disk space, lock timeout, or transaction log full).
  • On Windows Server 2025/Windows 11, you can also check logs directly at:
  C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG
  • Look for entries indicating the resumable index build completed, was cancelled, or encountered a fatal error prior to your PAUSE attempt.

Step 5: Restart the Resumable Operation if Necessary

  • If the operation has already completed or failed, simply re-issue the original CREATE INDEX or ALTER INDEX ... REBUILD WITH (RESUMABLE = ON) command to start a fresh resumable operation.
  • Only attempt PAUSE once you’ve confirmed via Step 1 that the state is RUNNING.

Alternative or Verification Steps

  • After applying the fix, re-run SELECT * FROM sys.index_resumable_operations; and confirm the state_desc shows RUNNING before issuing the PAUSE command again — it should now succeed without Error 10641.
  • As an alternative, if resumable pause/resume is not strictly required, consider letting the index operation run to completion or use ALTER INDEX ... REBUILD WITH (ONLINE = ON) without the resumable clause to avoid managing pause state manually.