Index rebuild blocks itself and runs in serializable isolation level
3
votes
1
answer
379
views
I’ve implemented Ola Hallengren maintenance solution in one database, and I’m noticing that it’s getting blocked by itself, I don’t know why honestly.
What I have noticed, is that it seems to be run within a serializable isolation level, which is weird since the default isolation level is read committed, and the maintenance script does not change it explicitly.
So, the questions are:
- Could the isolation level be related to this locking issue?
- Assuming that indexes are rebuild in sequential way….why would the script block itself within the same SPID?
Blocked process report sample can be found here .
Output of

@LogToTable='Y'
can be found here .
The process does complete without errors. This is still a problem, due to the fact that all running user requests are put on hold while the reindex process is running. Duration would not be an issue if no locks were generated. Since a lot of locks are generated, then duration (2 hours) is indeed an issue on a heavily used database.
Asked by dsuy
(480 rep)
Jun 1, 2018, 09:37 PM
Last activity: Apr 24, 2025, 01:08 PM
Last activity: Apr 24, 2025, 01:08 PM