Lock request time out on Rebuild of index

  • Hi all

    I have a clustered index rebuild that runs weekly but more often than not fails on a particular clustered index. The table is quite large and is heavily fragmented.

    However I keep getting a lock request time out whenever I try to run the ALTER INDEX REBUILD command.

    Does anyone have any suggestions about how I can get this command to complete?

    Thanks

  • You need to kill the process that is already accessing that index. This may just be a case of stopping your application while you perform the index rebuilds.

    John

  • Hi thanks for the reply. How can I see whats currently accessing that index? I am having a mental block on this.

    Thanks

  • kill the index job and then restart on offline hours.

    sp_who2 to see who's blocking you (your spid is visible if the query window of SSMS).

  • Or is there any ways to run a reorganize daily so that is splits the load?

  • While the index rebuild is running, execute sp_who2 a few times. If the same SPID appears in the BlkBy column every time, and the SPID being blocked has ALTER INDEX in the Command column, then you have found the process that's stopping your index from being rebuilt. You can use DBCC INPUTBUFFER to find out what it's running.

    John

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply