Today I bring a weird problem, but first I wan to explain the scenario where we have deployed our SharePoint farm.
It was a development server were we have configured NTLM in the default zone and ADFS in the Intranet zone, everything was working fine, but suddenly the search service stopped working in the ADFS zone while in the NTLM zone was still possible to extract search results.
It was a weird problem, we checked the logs and we received an error like the following:
Exception occured in scope Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries. Exception=System.NullReferenceException: Object reference not set to an instance of an object.
Also we tried to use the SharePoint APIs using the following
But we received an “exception ocurred” message
At this point, we were lost, so we started to watch the site collections listed in the farm, and we discovered that was listed one MySite Site collection as orphan. The site collection was inaccesible, also it has no properties listed, so we decided to delete the site collection by Central Admin. Unfortunately was not possible to select the site collection to delete, things continue weird…After trying to do this, we tried to delete the site collection by PowerShell, but was not possible to execute the get-spsite or remove-spsite against this site collection, it gave us an exception…
As a last option, we tried the following:
We detached the database which the MySites were stored from central admin and we executed the following to re-attach it again to SharePoint:
Mount-SPContentDatabase “<ContentDb>” -DatabaseServer “<DbServer>” -WebApplication http://SiteName
Once we attach it again, was possible to access to the site collection, also it was possible to delete it, but the most surprising thing it was that the search on ADFS it was working again!!!!
I don’t know the relation between ADFS and the orphan site collection but I spent a lot of hours to solve this problem. I anyone has a problem similar to that, try to detach the content database first, maybe it helps…
2 thoughts on “Orphan Site Collections”
You are BEAST! Big thanks for sharing this solution!
I’m glad that the solution had helped you. Till next time folk!