Issue
After applying Cummulative Updates to SharePoint, it can happen that you are facing an issue with orphan sites in one or more content dbs.
As these are flagged as errors, the configuration wizzard that needs to be run after the bits have been applied to all servers, cannot complete the job and will fail.
Error
06/29/2016 07:17:54.93 OWSTIMER (0x4D38) 0x4F84 SharePoint Foundation Upgrade SPContentDatabaseSequence ajxkz ERROR Database [SP_DVT_INSIGHT_ContentInsightDB_01] contains a site (Id = [54916e1a-54f3-43d0-ae74-d2915ab4e55f], Url = [/Workspaces/WS_002250]) that is not found in the site map. Consider detach and reattach the database. 39cc8a9d-a8ae-a04a-f205-a18cb49efb20
Solution
The solution is to detach the content db where the orphan site has been detected and then mont the database back in. After the database is back in its place, you can locate the orphan site and delete it. (If you are curious, you should be able to browse to that orphan site, just to double check there is no critical content in it).
high level steps
- Detach mentioned content db
- Mount mentioned content db back in
- Delete orphan site
- Restart configuration wizzard
doing
Get-SPContentDatabase [DB] | Dismount-SPContentDatabase
Mount-SPContentDatabase [DB] -DatabaseServer “SP-SQL-FARM” -WebApplication [DEFAULT ZONE URL OF THE WEB APP]
Remove-SPSite [ORPHANSITE-MENTIONED IN LOG]