ITMS 8.1, 8.5
Looking at SQL management studio, we can see that the SQL process taking too long while "Reactivate Uninstalled Items" is while updating RM_ResourceFile table. For this customer, this table had over 41 million rows.
The problematic SP is "spSetProductUninstalled" which gets called to mark resources that belong to uninstalled products.
This issue has been reported to our Broadcom Development team. Currently, initial approach for handling this issue has been added to our ITMS 8.6 RU1 release. See ITMS 8.6 RU1 Release Notes: "Upgrade is taking too long during the Reactivate Uninstalled Items step."
There is a possible way to trim this RM_ResourceFile table.
217666 "RM_ResourceFile table is too large"
See internal notes on this KB for a possible workaround if cleaning up the RM_ResourceFile table takes too long.