December 14, 2010 at 8:06 am
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
December 14, 2010 at 8:16 am
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
December 14, 2010 at 8:25 am
Hi thanks for the reply. How can I see whats currently accessing that index? I am having a mental block on this.
Thanks
December 14, 2010 at 8:32 am
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).
December 14, 2010 at 8:34 am
Or is there any ways to run a reorganize daily so that is splits the load?
December 14, 2010 at 8:34 am
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