On MSSQL server database, while rebuild index failed, we can use the follow sql statement to see if there are some tables' index setting block the operation.
if there are some index of users' table in the query result, we can check if the option setting "Allow page locks" of the index is set with "True". if not, we should set it to "True".
SELECTOBJECT_NAME(i.object_id)as TableName ,
name as IndexName ,
allow_page_locks
FROMsys.indexesas i
WHEREALLOW_PAGE_LOCKS= 0
The default query result: