Index Task "Stuck" at Position Zero in the Activity Queue

Occasionally, index tasks can be found halted in place at position zero in the Activity Queue. This typically happens in situations where the scheduler service has been stopped or restarted while an index is in the process of stopping.

This does not prevent other tasks from running, but the "stuck" index cannot be rescheduled as it's status in the index overview is "Processing".

Resolution

The index status can be reset to normal by following these steps

  1. Start Microsoft SQL Server Management Studio (SSMS)
  2. Connect to the server instance that hosts the Discovery Center database
  3. Open a new query for your Discovery Center database
  4. Modify the SQL statement shown below, so that the first line identifies the name of the index to update within the single quotes.
  5. Execute the edited query
  6. Confirm the index has been removed from position 0 in the activity queue
DECLARE @IndexName NVARCHAR(40) = 'SetProblemIndexNameHere'
UPDATE t
SET Status = 50
FROM Task t
JOIN IndexTask it ON it.tid = t.tid
JOIN IndexDefinition id ON id.idid = it.idid
WHERE id.Name = @indexName