There have been cases where there are known subnets that exist in the environment but do not exist in the Inv_Subnet table. This causes the problem first with Site Maintenance but also with the GetPackageInfo request. If the subnet does not exist in that table then the site maintenance doesn't work correctly for these missing subnets.How can the Inv_Subnet table be repopulated then?
The cause of the problem is that there is most likely an existing resource in the Item table associated with the particular missing subnets. It isn't known how the association might have been broken, but if the resource item exists in the Item table then the scheduled task that rebuilds the Inv_Subnet table will skip that item, and consequently the Inv_Subnet table continues to have missing subnets.
The items should not be deleted directly from the Item table through a SQL statement but rather a report or collection should be created that displays the items in question, then delete the items through the report. That way any associations with those items can also be cleaned up correctly. One cause for this situation may have been some type of deletion through SQL and the resource associations were lost.
-- Select the subnet reources items into a temp table in case there is
-- the need to put them back.
select * into #tmp_Resources from Item where ClassGuid = '9B9FF898-44D5-482E-8B9E-3F9997BD880E'-- Uncomment the following SQL to remover the temp table once the
-- information has been validated.
-- drop table #tmp_Resources
select * from Item where ClassGuid = '9B9FF898-44D5-482E-8B9E-3F9997BD880E'